Skip to content

status codes #67

@thurber

Description

@thurber

Thanks for the great library; I'm enjoying tinkering with my WICED!

It would be neat if the AdafruitHTTPServer object was able to set the status code of the response within a dynamic callback handler in addition to (or instead of) generating the content. For instance in the example file_not_found_generator, one might hope to do something like the following:

...
void file_not_found_generator (const char* url, const char* query, httppage_request_t* http_request)
{
  (void) url;
  (void) query;
  (void) http_request;
  httpserver.sendStatus(HTTP_STATUS_NOT_FOUND);
}
...

Alternatively, one might desire access to some type of httppage_response_t that could be manipulated in more advanced ways.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions