0

AdafruitHTTPServer handling POST requests!!!
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AdafruitHTTPServer handling POST requests!!!

by anhphuong on Sun Jan 20, 2019 10:18 pm

Hello,

I'm using <adafruit_http_server.h> and follwing the example to create an HTTP server.
I'm stuck in how to handle POST request.
I have a page with a form, that does POST a file content to another page. That other page has a dynamic function callback:
void info_html_generator (const char* url, const char* query, httppage_request_t* http_request)

Looking at the 'http_request' i can see that the type is POST, but there is no data.
'http_request-> length' is zero -- no data, however:
'http_request->data_remaining' is not zero, and it is the exact number of bytes that the POST is sending.

How do I access that remaining data?

Any help is appreciated. Thank you.

anhphuong
 
Posts: 1
Joined: Sun Jan 20, 2019 10:15 pm

Please be positive and constructive with your questions and comments.