Post topics, source code that relate to the Arduino Platform

User avatar
By Linton_Samuel_Dawson
#26210 Hello everybody, I'm new here but I'm playing around with Arduino since a few months, and I got this month some ESP8266 01 to play with..
Actually I'm working with AT commands, and everything seems to go well... The only thing that I can't get to work is to create a correct GET request..
What I'm trying to do is getting the numbers from this page: http://coolparis.azundo.com/
They are just three different temperature in Paris, a friend of mine set that up with a Python script.
I can connect to it with:
AT+CIPSTART=2,"TCP","coolparis.azundo.com",80

but then I'm stuck with:
AT+CIPSEND=2,20

OK
> GET / HTTP/1.0\r\n

SEND OK

+IPD,2,173:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.0.12</center>
</body>
</html>
2,CLOSED

I'm trying different combinations, using also
GET / HTTP/1.1\r\n\r\n

but I always get back a Bad request..

anyone has any idea on how to get that data?
I am missing something fundamental?

Thank you!
User avatar
By Linton_Samuel_Dawson
#26216 thank you for answering :D

yutonet wrote:try this:

Code: Select allGET http://coolparis.azundo.com/ HTTP/1.0\r\n\r\n\r\n


(also change the CIPSEND char length accordingly)


just to be sure, is it working for you?

because here this happens:

Code: Select allAT+CIPSTART=2,"TCP","coolparis.azundo.com",80

2,CONNECT

OK
AT+CIPSEND=2,55


OK
> GET http://coolparis.azundo.com/ HTTP/1.0\r\n\r\n\r\n

SEND OK

+IPD,2,173:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.0.12</center>
</body>
</html>
2,CLOSED


maybe I'm missing something else earlier?