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

Function onConfigurationJson

samples/Basic_WebSkeletonApp_LTS/app/webserver.cpp:55–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void onConfigurationJson(HttpRequest& request, HttpResponse& response)
56{
57 JsonObjectStream* stream = new JsonObjectStream();
58 JsonObject& json = stream->getRoot();
59
60 json["StaSSID"] = ActiveConfig.StaSSID;
61 json["StaPassword"] = ActiveConfig.StaPassword;
62 json["StaEnable"] = ActiveConfig.StaEnable;
63
64 response.sendDataStream(stream, MIME_JSON);
65}
66void onFile(HttpRequest& request, HttpResponse& response)
67{
68 String file = request.uri.getRelativePath();

Callers

nothing calls this directly

Calls 2

getRootMethod · 0.80
sendDataStreamMethod · 0.45

Tested by

no test coverage detected