mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-19 19:28:29 +00:00
Updated README
This commit is contained in:
parent
ac18b70a0f
commit
6e46ccb37c
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -30,6 +30,16 @@ int main(void)
|
|||
res.set_content(numbers, "text/plain");
|
||||
});
|
||||
|
||||
svr.Get("/body-header-param", [](const Request& req, Response& res) {
|
||||
if (req.has_header("Content-Length")) {
|
||||
auto val = req.get_header_value("Content-Length");
|
||||
}
|
||||
if (req.has_param("key")) {
|
||||
auto val = req.get_param_value("key");
|
||||
}
|
||||
res.set_content(req.body, "text/plain");
|
||||
});
|
||||
|
||||
svr.Get("/stop", [&](const Request& req, Response& res) {
|
||||
svr.stop();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue