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

Function onIndex

samples/HttpServer_WebSockets/app/application.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21CUserData userGeorge;
22
23void onIndex(HttpRequest& request, HttpResponse& response)
24{
25 auto tmpl = new TemplateFileStream(F("index.html"));
26 //auto& vars = tmpl->variables();
27 //vars["counter"] = String(counter);
28 response.sendNamedStream(tmpl); // this template object will be deleted automatically
29}
30
31void onFile(HttpRequest& request, HttpResponse& response)
32{

Callers

nothing calls this directly

Calls 2

sendNamedStreamMethod · 0.80
FFunction · 0.50

Tested by

no test coverage detected