Open Rsaliu opened 6 months ago
@Rsaliu i'm sorry that AT+HTTPCPOST
command does not provide a HTTP errrno after post request. it always returns the ERROR
if errno > 400
.
We will consider whether to add an HTTP error code in this case. As a workaround, you can catch the errno in esp_http_client_get_status_code()
API, and send it by esp_at_port_write_data()
.
We are also having this issue, even in the current master branch. It is really unconvenient to not have a way to check the return code of the HTTP transaction.
As a workaround, you can catch the errno in esp_http_client_get_status_code() API, and send it by esp_at_port_write_data()
Not sure what is the meaning of this, maybe you got confused of repository? This is ESP AT Firmware, so we only have AT commands, not C functions on ESP-IDF framework.
Answers checklist.
General issue report
I am working with esp-at.
I can successfully send a post request using:
AT+HTTPCPOST
After sending the post request, I got the following output with SEND OK which means that it is successful.
However, I can't get the error code. According to the document, it says to AT+HTTPCLIENT to get the error code but that always results in an error.
Kindly help on how to get HTTP error code after post request.