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.
AT+HTTPCPOST
Re: AT+HTTPCPOST
Just a quick update:
When using AT+HTTPCLIENT I formatted the JSON data correctly and the command returned OK.
I used the exact same JSON data with this command and the same server replies that it needs the first data item.
Any thoughts?
When using AT+HTTPCLIENT I formatted the JSON data correctly and the command returned OK.
I used the exact same JSON data with this command and the same server replies that it needs the first data item.
Any thoughts?
Re: AT+HTTPCPOST
Can you provide the specific steps you took to reproduce it? For example, AT commands sent along with version numbers and error logs (if possible) provide unencrypted packet captures.
Re: AT+HTTPCPOST
Hi,
I should have been more specific.
It looks like this is a problem related to version 2.1.0.0 of the firmware, where data is being sent at text/xml even though I specified application/json.
I saw a note to update the code to 2.2.0 but the same problem exists.
I notice a note for 2.3.0.0 for the MINI, but I'm using a WROOM and so this fix isn't in yet to the WROOM firmware.
I should have been more specific.
It looks like this is a problem related to version 2.1.0.0 of the firmware, where data is being sent at text/xml even though I specified application/json.
I saw a note to update the code to 2.2.0 but the same problem exists.
I notice a note for 2.3.0.0 for the MINI, but I'm using a WROOM and so this fix isn't in yet to the WROOM firmware.
Re: AT+HTTPCPOST
Maybe you can download the latest wroom test firmware from here (https://github.com/espressif/esp-at/act ... 2319465429) to test this function.
You can refer to this document <How to Download the Latest Temporary Version of AT Firmware from GitHub>(https://docs.espressif.com/projects/esp ... rom-github) to download at firmware from GitHub.
You can refer to this document <How to Download the Latest Temporary Version of AT Firmware from GitHub>(https://docs.espressif.com/projects/esp ... rom-github) to download at firmware from GitHub.
Re: AT+HTTPCPOST
Hi,
I want to report that the latest firmware release for the WROOM worked and I am able to POST JSON data without error.
Thank you.
Is there a proposed release date for the firmware?
I want to report that the latest firmware release for the WROOM worked and I am able to POST JSON data without error.
Thank you.
Is there a proposed release date for the firmware?
Re: AT+HTTPCPOST
I think the release v2.4 version should also not have the previous issue, because this version was released recently, you can probably get it from this link (https://docs.espressif.com/projects/esp ... aries.html).
Who is online
Users browsing this forum: No registered users and 6 guests