mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Update README
This commit is contained in:
parent
88411a1f52
commit
78c474c744
1 changed files with 2 additions and 2 deletions
|
@ -183,9 +183,9 @@ svr.set_error_handler([](const auto& req, auto& res) {
|
||||||
svr.set_pre_routing_handler([](const auto& req, auto& res) -> bool {
|
svr.set_pre_routing_handler([](const auto& req, auto& res) -> bool {
|
||||||
if (req.path == "/hello") {
|
if (req.path == "/hello") {
|
||||||
res.set_content("world", "text/html");
|
res.set_content("world", "text/html");
|
||||||
return true; // This request is handled
|
return Server::HandlerResponse::Handled;
|
||||||
}
|
}
|
||||||
return false; // Let the router handle this request
|
return Server::HandlerResponse::Unhandled;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue