Https request / Content-length = 0
Posted: Tue Sep 28, 2021 6:35 am
Hi,
I have been able to get data from and API endpoint using esp_http_client_open() or esp_http_client_perform().
But now I can't because the server where I request for getting data has activate certificate authorization for some services. I always get content-length = 0.
However the endpoint I call is not protected usign certificate authorization. But if you call the endpoint usign a web browser you must skip a window popup requesting for a certificate. After skipping this popup you get the data because authorization is not required indeed.
Moreover if you use Curl command to call this endpoint you get the data without problems.
I've have seen a few examples using a port of curl command for esp32 devices but I haven't been able to make it working.
Are there other functions instead of esp_http_client_open() or esp_http_client_perform() I can try?
Including a certificate in my request is not an option because I have to mantaing compatibility with other devices that use certificates.
Please, may you help me?
Thanks in advance
I have been able to get data from and API endpoint using esp_http_client_open() or esp_http_client_perform().
But now I can't because the server where I request for getting data has activate certificate authorization for some services. I always get content-length = 0.
However the endpoint I call is not protected usign certificate authorization. But if you call the endpoint usign a web browser you must skip a window popup requesting for a certificate. After skipping this popup you get the data because authorization is not required indeed.
Moreover if you use Curl command to call this endpoint you get the data without problems.
I've have seen a few examples using a port of curl command for esp32 devices but I haven't been able to make it working.
Are there other functions instead of esp_http_client_open() or esp_http_client_perform() I can try?
Including a certificate in my request is not an option because I have to mantaing compatibility with other devices that use certificates.
Please, may you help me?
Thanks in advance