SoftAP HTTP pages
The page callback function
When your page handler function is called, the system passes a result callback function as the cb parameter.
The callback function takes these parameters:
cbArg: this is thecbArgparameter passed to your page callback function. It's internal state used by the HTTP server.flags: presently unused. Set to 0.status: the HTTP status code, as an integer, such as 200 forOK, or 404 forpage not found.mime-type: the mime-type of the response as a string, such astext/htmlorapplication/javascript.header: an optional pointer to aHeaderthat is added to the response sent to the client.
For example, to send a "not found" error for a page that is not recognized, your application code would call
// EXAMPLE - send a 404 response for an unknown page
cb(cbArg, 0, 404, "text/plain", nullptr);