I am using ESP8266 v1 connected to RX & TX pin of my Arduino. I am trying to send AT commands to request post query. But only thing i get is 400 bad request error. I have web api deployed on my PC. The ESP8266 is also connected to the same network. I am able to connect by AT+CIPSTART=1,"TCP","192.168.0.150",8011 . It shows connect ok, then i set the the length of the characters to be sent and i just write the post command but i get 400 error.
below is the steps i am following every command is successful except the post command after > sign.
AT
AT+RST
AT+CWMODE=3
AT+CIPSTART=1,"TCP","192.168.0.150"8011
AT+CIPSEND=1,211
then it shows
>
POST /api/runtime HTTP/1.1\r\n
Host: 192.168.0.150:8011\r\n
Content-Type: application/json\r\n
Content-Length: 37\r\n
Accept: */*\r\n
Connection: Close\r\n
Cache-Control: no-cache\r\n\r\n
{"Value1":22,"Value2":45,"Value3":98}
I am able to send the command from the postman application But not with the AT Command. My address for the API is
http://192.168.0.150:8011/api/RunTime
One more thing i would like to add is am writing these command directly upon the serial monitor with carriage return and new line with baud rate of 115200. I have been scratching my head for a week and found no luck. Please help. Thanks
MY ESP8266 VERSION IS
AT+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(5a875ba)
Farylink Technology Co., Ltd. v1.0.0.2
May 11 2017 22:23:58
OK