mathieucarbou / ESPAsyncWebServer

Asynchronous HTTP and WebSocket Server Library for ESP32, ESP8266 and RP2040
https://mathieu.carbou.me/ESPAsyncWebServer/
GNU Lesser General Public License v3.0
87 stars 17 forks source link

Support for replacing a response by a new one #103

Closed mathieucarbou closed 2 months ago

mathieucarbou commented 2 months ago

This really simple PR allows for a very nice feat: ability to override a previously prepared response, in order tp build a new one.

the real sending will happen once the handle exist, not in the send method anymore.

this will allow to have middleware support for response headers too!

mathieucarbou commented 2 months ago

@DRSDavidSoft: FYI

DRSDavidSoft commented 2 months ago

@mathieucarbou Wow, this is some excellent addition! How does it work internally? Also, what was the previous behavior, for reference?

Thanks for adding this too! 👍🏻

mathieucarbou commented 2 months ago

@mathieucarbou Wow, this is some excellent addition! How does it work internally? Also, what was the previous behavior, for reference?

Look at the code ;-)