AT Command for sending POST request
Posted: Thu May 14, 2015 11:29 pm
Has any one succeeded in sending POST request to HTTP server using AT command?
I tried the following but it seems doesn't work.
The Post request is:
POST /sensor HTTP/1.1
X-Parse-REST-API-Key: supersecretapikey
Content-Type: application/json
Host: ohomesensor.parseapp.com
Content-Length: 40
{"identifier":"washer","state":true}
I send AT command to my esp through arduino:
AT+CIPSTART="TCP","ohomesensor.parseapp.com",80
AT+CIPSEND=149
(wait for return of ">")
POST /sensor HTTP/1.1/r/nHost: ohomesensor.parseapp.com/r/nContent-Type: application/json /r/nContent-Length: 39/r/n/r/n{"identifier":"washer", "state":true}
I get response SEND OK, but in the server side I receive nothing.
I have tested post request using online tool, and it worked. The only problem I think is the AT command.
I can do GET request with the AT command, but not the POST request.
I have also modified the TX RX buffer size of my arduino to 256.
Any help is greatly appreciated.
I tried the following but it seems doesn't work.
The Post request is:
POST /sensor HTTP/1.1
X-Parse-REST-API-Key: supersecretapikey
Content-Type: application/json
Host: ohomesensor.parseapp.com
Content-Length: 40
{"identifier":"washer","state":true}
I send AT command to my esp through arduino:
AT+CIPSTART="TCP","ohomesensor.parseapp.com",80
AT+CIPSEND=149
(wait for return of ">")
POST /sensor HTTP/1.1/r/nHost: ohomesensor.parseapp.com/r/nContent-Type: application/json /r/nContent-Length: 39/r/n/r/n{"identifier":"washer", "state":true}
I get response SEND OK, but in the server side I receive nothing.
I have tested post request using online tool, and it worked. The only problem I think is the AT command.
I can do GET request with the AT command, but not the POST request.
I have also modified the TX RX buffer size of my arduino to 256.
Any help is greatly appreciated.