Is it possible to run esp_http_client asynchronously?

toljatyr
Posts: 12
Joined: Mon Mar 07, 2022 10:39 am

Is it possible to run esp_http_client asynchronously?

Postby toljatyr » Wed Jun 01, 2022 10:17 am

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?

miwied
Posts: 1
Joined: Sat Sep 10, 2022 2:48 pm

Re: Is it possible to run esp_http_client asynchronously?

Postby miwied » Sat Sep 10, 2022 2:50 pm

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?

Who is online

Users browsing this forum: No registered users and 88 guests