AT+HTTPCPOST
Posted: Mon May 09, 2022 8:56 pm
Hi,
I'm using an ESP32-WROOM 32E. This device is connected to another chip and the ESP is being used only for WiF, and is being configured and commanded over a UART. I am having trouble getting AT+HTTPCPOST to work.
To test, I used:
AT+HTTPCPOST="http://httpbin.org/post",65,1,"content-type: application/json"
And for data I used:
{"alertCode" : "alertid","timestamp": "2022-02-09T21:58:08.674Z"}
This works fine.
When I try to do the same with a server I'm working with:
AT+HTTPCPOST="https:...",65,2,"Authorization: ***","Content-type: application/json"
I receive as a reply 'alertCode is required' which I take to mean that the JSON data is not being transmitted.
Do you have any examples of actual JSON data being used?
Thank you.
I'm using an ESP32-WROOM 32E. This device is connected to another chip and the ESP is being used only for WiF, and is being configured and commanded over a UART. I am having trouble getting AT+HTTPCPOST to work.
To test, I used:
AT+HTTPCPOST="http://httpbin.org/post",65,1,"content-type: application/json"
And for data I used:
{"alertCode" : "alertid","timestamp": "2022-02-09T21:58:08.674Z"}
This works fine.
When I try to do the same with a server I'm working with:
AT+HTTPCPOST="https:...",65,2,"Authorization: ***","Content-type: application/json"
I receive as a reply 'alertCode is required' which I take to mean that the JSON data is not being transmitted.
Do you have any examples of actual JSON data being used?
Thank you.