AfterRequest Example | Qt HTTP Server 6.4.1

- Qt 6.4
- Qt HTTP Server
- Qt HTTP Server Examples
- AfterRequest Example
- Qt 6.4.1 Reference Documentation

# AfterRequest Example

Example of the usage of `afterRequest()`.

This example shows how to use the `afterRequest()` function of the QHttpServer to change the QHttpServerResponse object after it has been handled by the `route()` function. It demonstrates how HTTP headers can be added to the response.

Files:

- afterrequest/CMakeLists.txt
- afterrequest/afterrequest.pro
- afterrequest/main.cpp