drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.04k stars 1.06k forks source link

Use async callbacks for custom error handler #2009

Open Mis1eader-dev opened 2 months ago

Mis1eader-dev commented 2 months ago

Is your feature request related to a problem? Please describe. Responses have to be available immediately on the custom error handler, but it can be callback-based just like request handlers, which allows for async responses, and request forwarding.

Describe the solution you'd like Use callbacks instead of HttpResponsePtr returns.

Describe alternatives you've considered Using ADD_METHOD_VIA_REGEX to capture everything that is not captured by file responses, API endpoints, WebSocket endpoints, etc.