Moved SimpleWeb::string_view to utility.hpp, and made use of string_view in Server::Response::write
This commit is contained in:
parent
0ae69bffb1
commit
56b1df1ee5
5 changed files with 20 additions and 20 deletions
|
|
@ -108,7 +108,7 @@ int main() {
|
|||
// GET-example for the path /match/[number], responds with the matched string in path (number)
|
||||
// For instance a request GET /match/123 will receive: 123
|
||||
server.resource["^/match/([0-9]+)$"]["GET"] = [](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
|
||||
response->write(request->path_match[1]);
|
||||
response->write(request->path_match[1].str());
|
||||
};
|
||||
|
||||
// GET-example simulating heavy work in a separate thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue