When your page handler function is called, the system passes a result callback function as the
The callback function takes these parameters:
cbArg: this is the
cbArgparameter 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 for
OK, or 404 for
page not found.
mime-type: the mime-type of the response as a string, such as
header: an optional pointer to a
Headerthat 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);