-->
Page 1 of 1

Problem in sending data to webpage using external web server

PostPosted: Fri Aug 18, 2017 2:33 am
by Gurpiyar Singh
Hello Everyone!!

Greeting from my side....

I am new to esp8266 so i have little knowledge about it. I have to send data to Web page via external web server. I am trying to use in AT+CWMODE=3 to connect it to external server but i only recieve 400 bad request in return. Can anyone figure out my mistake pls....

AT commands i am using are as here:

AT+CIPSTART="TCP","www.eespl.org",80\r\n
AT+CIPSEND=59\r\n
GET /testing_gurpiyar.php HTTP/1.1\r\nHost: http://www.hostgator.com\r\n\r\n\r\n


Its urgent...

Re: Problem in sending data to webpage using external web se

PostPosted: Mon Aug 21, 2017 6:48 am
by eduperez
A "400 bad request" message usually indicates that the (external) web server did receive your request, but does not understand it. If I try to issue that request from the command-line in my computer, I obtain the same error; so it is definitively an error in your request or the server.

Is the server at "www.eespl.org" configured to accept requests for "www.hostgator.com"?
Is the server at "www.hostgator.com" answering for "/testing_gurpiyar.php"?
Is your request really 59 bytes long?

Re: Problem in sending data to webpage using external web se

PostPosted: Mon Aug 21, 2017 11:00 am
by martinayotte
eduperez wrote:Is your request really 59 bytes long?

Nope ! simple len() in python revealed 72 bytes.