You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Thanks for posting the suggestion. It is kind of hard to provide a complete solution for the HTTP. Indeed for advanced pages, user may want to pack additional data into the HTTP header. Currently a simple header is written with status = 200 before the generator is invoked. So that normal user only need to focus on the contents, which work for 90% of cases.
For advanced control, maybe we will create another type of HTTPPage where the generator is responsible for sending the header as well (hence everything return to client). There is a bit learning curve for what to include in the header, but this way we will solve this type of request once and for all.
How does it sound ?? If you are not familiar HTTP Response Header, we will add some helper as well ( You've better be though).
PS: We are busy on a new exciting product. Please give us a bit of time, we will get you update when it is done.
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:
Alternatively, one might desire access to some type of
httppage_response_t
that could be manipulated in more advanced ways.The text was updated successfully, but these errors were encountered: