We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f008fe4 commit e42a358Copy full SHA for e42a358
README.md
@@ -173,6 +173,26 @@ svr.set_error_handler([](const auto& req, auto& res) {
173
});
174
```
175
176
+### Pre routing handler
177
+
178
+```cpp
179
+svr.set_pre_routing_handler([](const auto& req, auto& res) -> bool {
180
+ if (req.path == "/hello") {
181
+ res.set_content("world", "text/html");
182
+ return true; // This request is handled
183
+ }
184
+ return false; // Let the router handle this request
185
+});
186
+```
187
188
+### Post routing handler
189
190
191
+svr.set_post_routing_handler([](const auto& req, auto& res) {
192
+ res.set_header("ADDITIONAL_HEADER", "value");
193
194
195
196
### 'multipart/form-data' POST data
197
198
```cpp
0 commit comments