MCPcopy Create free account
hub / github.com/ArduPilot/ArduRemoteID / AJAX_Handler

Class AJAX_Handler

RemoteIDModule/webinterface.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 serve files from ROMFS
71 */
72class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected