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

Function onConfigurationJson

samples/Basic_WebSkeletonApp/app/webserver.cpp:145–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void onConfigurationJson(HttpRequest& request, HttpResponse& response)
146{
147 JsonObjectStream* stream = new JsonObjectStream();
148 JsonObject json = stream->getRoot();
149
150 json["StaSSID"] = activeConfig.StaSSID;
151 json["StaPassword"] = activeConfig.StaPassword;
152 json["StaEnable"] = activeConfig.StaEnable;
153
154 response.sendDataStream(stream, MIME_JSON);
155}
156
157int onFile(HttpServerConnection& connection, HttpRequest& request, HttpResponse& response)
158{

Callers

nothing calls this directly

Calls 2

getRootMethod · 0.80
sendDataStreamMethod · 0.45

Tested by

no test coverage detected