| 70 | serve files from ROMFS |
| 71 | */ |
| 72 | class AJAX_Handler : public RequestHandler |
| 73 | { |
| 74 | bool canHandle(HTTPMethod method, String uri) { |
| 75 | return uri == "/ajax/status.json"; |
| 76 | } |
| 77 | |
| 78 | bool handle(WebServer& server, HTTPMethod requestMethod, String requestUri) { |
| 79 | if (requestUri != "/ajax/status.json") { |
| 80 | return false; |
| 81 | } |
| 82 | server.send(200, "application/json", status_json()); |
| 83 | return true; |
| 84 | } |
| 85 | |
| 86 | } AJAX_Handler; |
| 87 | |
| 88 | /* |
| 89 | init web server |
nothing calls this directly
no outgoing calls
no test coverage detected