Jump to content

From POST method - how is the form data sent from the web browser


boylesg

Recommended Posts

I have an arduino connected to my home network via a wifi shield.

 

I can successfully read the HTTP headers (on the arduino) sent from my browser and send a HTTP response back to the browser from the arduino.

 

But I cannot figure out how to intercept the form data on the arduino when using the POST method.

 

Does the browser send a POST http header, with the data size of the following data and then immediately send the data so that I can read it all with one read loop?

 

Does the browser send a POST http header, with the data size and then the actual data in separate packet?

 

Do the data packets have their own headers and the data is terminated by \r\n like the headers?

 

Or are they data packets just arrive with no headers and no \n\r asynchronously and you have to just keep trying to read until you have read the amount of data specified in the POST http header?

 

How does all this work at this low level?

 

When you are dealing with a full web server with PHP etc, you don't have to worry about any of this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...