POST JSON content using AT+CIPSEND command
Posted: Thu Jul 29, 2021 12:51 pm
I need correct syntax to use AT+CIPSEND command in order to send HTTP POST request.
First I send:
AT+CIPSTART="TCP","test.myserver.com",80
CONNECT
OK
Then:
AT+CIPSEND=130
When I get the prompt I send something like:
> POST /test_json.php HTTP/1.1\r\nHost: test.myserver.com\r\nContent-Type: application/json\r\nContent-length: 11\r\n\r\n{"test": 3}
SEND OK
CLOSED
I get a SEND OK response from the ESP32 but the server does not received any HTTP POST request and the connection is CLOSED just after
First I send:
AT+CIPSTART="TCP","test.myserver.com",80
CONNECT
OK
Then:
AT+CIPSEND=130
When I get the prompt I send something like:
> POST /test_json.php HTTP/1.1\r\nHost: test.myserver.com\r\nContent-Type: application/json\r\nContent-length: 11\r\n\r\n{"test": 3}
SEND OK
CLOSED
I get a SEND OK response from the ESP32 but the server does not received any HTTP POST request and the connection is CLOSED just after