WiFiEsp library

robo17:
I see thank you Juraj.

But I have this question now, this is POST request I get on arduino:

POST / HTTP/1.1

Host: 192.168.1.34
Connection: keep-alive
Content-Length: 39
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.1.34
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.1.34/L
Accept-Encoding: gzip, deflate
Accept-Language: hr,en-US;q=0.9,en;q=0.8







WHERE is post data??

But I still get this on esp server side and inside there is no post data i send to him...

SteveMann:
R - Are you trying to do this the hard way?

If you need WiFi, use a board with WiFi. The Uno is a learning board with training wheels. My go-to board is the Wemos D1 Mini or if I need more I/O, the NodeMCU. They both have 4mb of Flash and WiFi. There are example sketches in the IDE for using them as Web Servers.

Thank you, I know.

But this is a college asssigment and goal is to make 8-bit microcotroller to serve as web server with the help of esp.

do you stop reading at empty line?

Juraj,I moved to GET request that include data in url instead of sending it in form data and it is working , but now I have another problem.

Sometimes i get on arduino all of the request sent from client but not every time.

Here you can see that one time i don’t get whole last line of request(about cookie) but in next request I do:

GET / HTTP/1.1
Host: 192.168.1.53
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: hr,en-US;q=0.9,en;q=0.8
Cookie: id=

MAIN

IMA COOKIE

GET /favicon.ico HTTP/1.1
Host: 192.168.1.53
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Accept: image/webp,image/apng,image/*,*/*;q=0.8
Referer: http://192.168.1.53/
Accept-Encoding: gzip, deflate
Accept-Language: hr,en-US;q=0.9,en;q=0.8
Cookie: id=2

I know the above code doesn’t give any explanation but I just wanted to show what i mean by not receiving whole request. If someone is willing to help code is in attachment.

Code.txt (5.74 KB)

the attached code is for Ethernet

Juraj:
the attached code is for Ethernet

Yes sorry I didn't mention it but these two libraries are same at least for my needs so all this code can be used for WiFiEsp, but problem with uncomplete client requestes is same.

Any ideas?