From 7fc1b1bf2017d1be3d42a1bef9521d1cfef12c28 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 5 Jul 2014 13:15:28 +0200 Subject: [PATCH] updated comments --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 808cc27..7e052ab 100644 --- a/main.cpp +++ b/main.cpp @@ -50,7 +50,8 @@ int main() { response << "HTTP/1.1 200 OK\r\nContent-Length: 13\r\n\r\nRoot resource"; }; - //GET-example for the path /match/[number], responds with the matched string in path (number) + //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 httpserver.resources["^/match/([0-9]*)/?$"]["^GET$"]=[](ostream& response, const Request& request, const smatch& path_match) { string number=path_match[1]; response << "HTTP/1.1 200 OK\r\nContent-Length: " << number.length() << "\r\n\r\n" << number;