From 6e46ccb37c470547cdd8fb3dc285b4a8acb30411 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 15 Mar 2020 12:05:12 -0400 Subject: [PATCH] Updated README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index f93e15b..72241df 100644 --- a/README.md +++ b/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(); });