1
0
mirror of synced 2025-07-29 11:01:13 +03:00
This commit is contained in:
yhirose
2024-09-06 23:51:39 -04:00
parent 327ff263f5
commit 8415bf0823
3 changed files with 103 additions and 10 deletions

View File

@ -384,6 +384,18 @@ svr.Get("/chunked", [&](const Request& req, Response& res) {
});
```
### Send file content
```cpp
svr.Get("/content", [&](const Request &req, Response &res) {
res.set_file_content("./path/to/conent.html");
});
svr.Get("/content", [&](const Request &req, Response &res) {
res.set_file_content("./path/to/conent", "text/html");
});
```
### 'Expect: 100-continue' handler
By default, the server sends a `100 Continue` response for an `Expect: 100-continue` header.