Page 1 of 1

webserver.sendContent method equivalent for ESPAsyncWebServer?

Posted: Thu Apr 10, 2025 2:29 pm
by t23319222
Hi,

I would like to know if there is a method like sendContent, but for ESPAsyncWebServer instead of the normal (sync) Webserver? I have a project and would like to convert it to use ESPAsyncWebServer.h instead of the normal Webserver.h library, but unfortunately there are many lines webserver.sendContent(...) in there and I don't know with what equivalent function I can replace them when using ESPAsyncWebServer?

Re: webserver.sendContent method equivalent for ESPAsyncWebServer?

Posted: Thu Apr 10, 2025 9:24 pm
by lbernstone
There's more than one way to do it. The simplest is to construct your string first, and then use a basic send()
https://github.com/ESP32Async/ESPAsyncW ... ng-content

Re: webserver.sendContent method equivalent for ESPAsyncWebServer?

Posted: Sat Apr 12, 2025 8:30 pm
by t23319222
What if the message is so large that it doesnt fit in the RAM of the ESP?

Re: webserver.sendContent method equivalent for ESPAsyncWebServer?

Posted: Sun Apr 13, 2025 2:17 am
by lbernstone
Please read the documentation. It explains how to send data from a stream or a file.