Page 1 of 1

Is it possible to run esp_http_client asynchronously?

Posted: Wed Jun 01, 2022 10:17 am
by toljatyr
I am trying to implement an HTTP-client, based on esp_http_client component, working in a fully asynchronous mode.
As it is said in the documentation
To enable non-blocking esp_http_client_perform(), is_async member of esp_http_client_config_t must be set while making a call to esp_http_client_init() API.
However, if the target host is not available or there is no WIFI, I found that esp_http_client_perform(client) blocks for about 10 sec, resuming only after the timeout ends.
Is that an expected behavior for async mode for esp_http_client?
I expected, that notwithstanding the case there should not be any blocking within the esp_http_client methods, isn't me right?

Re: Is it possible to run esp_http_client asynchronously?

Posted: Sat Sep 10, 2022 2:50 pm
by miwied
Hello.

Unfortunately I have exactly the same problem.

In the "esp_http_client_config_t" struct it says that it currently only works for https. However, there is nothing more in the official documentation.

Could you solve the problem in the meantime?