MCPcopy Create free account
hub / github.com/SmingHub/Sming / onAjaxGetState

Function onAjaxGetState

samples/Basic_WebSkeletonApp_LTS/app/webserver.cpp:78–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void onAjaxGetState(HttpRequest& request, HttpResponse& response)
79{
80 JsonObjectStream* stream = new JsonObjectStream();
81 JsonObject& json = stream->getRoot();
82
83 json["counter"] = counter;
84
85 response.sendDataStream(stream, MIME_JSON);
86}
87
88void startWebServer()
89{

Callers

nothing calls this directly

Calls 2

getRootMethod · 0.80
sendDataStreamMethod · 0.45

Tested by

no test coverage detected