From 94a5fb89711799df3e5a459f4be3d2c5abc79318 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 5 Jul 2014 20:15:31 +0200 Subject: [PATCH] Minor updates --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index ebac724..505e376 100644 --- a/main.cpp +++ b/main.cpp @@ -12,7 +12,7 @@ int main() { //HTTP-server at port 8080 using 4 threads HTTPServer httpserver(8080, 4); - //Add resources using regular expression for path, a method-string and an anonymous function + //Add resources using regular expression for path, a method-string, and an anonymous function //POST-example for the path /string, responds the posted string httpserver.resources["^/string/?$"]["POST"]=[](ostream& response, const Request& request, const smatch& path_match) { //Retrieve string from istream (*request.content) @@ -32,8 +32,8 @@ int main() { // "age": 25 //} httpserver.resources["^/json/?$"]["POST"]=[](ostream& response, const Request& request, const smatch& path_match) { - ptree pt; try { + ptree pt; read_json(*request.content, pt); string name=pt.get("firstName")+" "+pt.get("lastName");