diff --git a/http_examples.cpp b/http_examples.cpp index cf75e37..6643479 100644 --- a/http_examples.cpp +++ b/http_examples.cpp @@ -26,7 +26,7 @@ int main() { server.resource["^/string$"]["POST"]=[](HttpServer::Response& response, shared_ptr request) { //Retrieve string from istream (request->content) stringstream ss; - request->content >> ss.rdbuf(); + ss << request->content.rdbuf(); string content=ss.str(); response << "HTTP/1.1 200 OK\r\nContent-Length: " << content.length() << "\r\n\r\n" << content; diff --git a/https_examples.cpp b/https_examples.cpp index 9991c8e..9aa82d5 100644 --- a/https_examples.cpp +++ b/https_examples.cpp @@ -26,7 +26,7 @@ int main() { server.resource["^/string$"]["POST"]=[](HttpsServer::Response& response, shared_ptr request) { //Retrieve string from istream (request->content) stringstream ss; - request->content >> ss.rdbuf(); + ss << request->content.rdbuf(); string content=ss.str(); response << "HTTP/1.1 200 OK\r\nContent-Length: " << content.length() << "\r\n\r\n" << content;