-->
Page 2 of 2

Re: Unable to use HTTP client in ESPAsyncWebServer callback

PostPosted: Sat May 19, 2018 2:20 pm
by martinayotte
The fact that it is working fine on ESP32 is maybe related that it has 2 cores and using FreeRTOS.
A possible workaround on ESP8266 would be that your AsyncWebServer callback only turn a boolean flag to true and doing the HHTPClient GET inside the loop() when this flag appears ...

Re: Unable to use HTTP client in ESPAsyncWebServer callback

PostPosted: Sat May 19, 2018 4:38 pm
by Cosmic Mac
rudy wrote:When I read this I assumed you meant that you found your solution. Maybe that's what other people thought.
Now, knowing you still are looking for a solution, unfortunately I don't know enough to help.

Oups! Sorry for the confusion. :?

martinayotte wrote:A possible workaround on ESP8266 would be that your AsyncWebServer callback only turn a boolean flag to true and doing the HHTPClient GET inside the loop() when this flag appears ...

Unfortunately, I can't use this workaround in my real project because the AsyncWebServer response is depending on the HTTP Client GET result.

Thank you anyway Rudy & Martin for taking the time to answer.
In the meantime, I opened an issue on Github (but no answer yet).

Re: Unable to use HTTP client in ESPAsyncWebServer callback

PostPosted: Thu May 31, 2018 8:30 am
by Cosmic Mac
Actually, I will use your workaround Martin ;), together with a server side event.

See https://github.com/me-no-dev/ESPAsyncWe ... issues/364