| 64 | response.sendDataStream(stream, MIME_JSON); |
| 65 | } |
| 66 | void onFile(HttpRequest& request, HttpResponse& response) |
| 67 | { |
| 68 | String file = request.uri.getRelativePath(); |
| 69 | |
| 70 | if(file[0] == '.') |
| 71 | response.code = HTTP_STATUS_FORBIDDEN; |
| 72 | else { |
| 73 | response.setCache(86400, true); // It's important to use cache for better performance. |
| 74 | response.sendFile(file); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | void onAjaxGetState(HttpRequest& request, HttpResponse& response) |
| 79 | { |
nothing calls this directly
no test coverage detected