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;