I trying to use the POSt function in a Webpage, how is the construction of the POST string .
i programmed , with help of a arduino cookbook 2d edition, page 523, the next 3 lines, see below

However, the program written on that page doesn’t work, it seems that the datafiltering is incorrect…But maybe it could also that , see my previous post on the forum, that the website request is twice executed…see link


Click buttons to turn pin 8 on off


<input type=‘hidden’ name=‘pinD8’");
client.println(" value=‘0’>");

i assume it is “POST pinD=0” or is it more then that??


see my previous post on the forum, that the website request is twice executed..see link

And jurs explained to you why on that thread.

Any way to override that or do i have to read the request twice into the arduino, before procssing the POST data into the arduino??


The web browser is making two requests. One for the page, and the other for the icon.

Technically, you must parse the request for the POST page and the Content-Length. Then, once you receive the blank line, read the Content-Length number of bytes after that. The POST data may come in a separate packet. Most of the time it will come in the same packet as the request.


Do you have somekind of example of how the request is build? So the first request end with a newline and also the second request and with a newline...
Do you have an example of the Post string build up?

For now, i just looked for the POST word and then.for the pinD word followed by = and its value.... It works, but is it the correct way to do it?


Here is a thread that has the code in the first post.