adafruit / adafruit/Adafruit_WICED_Arduino

status codes

Open
#67 2 comments 0 reactions 1 assignee Claimed by @hathach View on GitHub
Dominant language
C
Stars
26
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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:

```c++
...
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.