Minor change in examples.
This commit is contained in:
parent
e78b321914
commit
c6806e6fde
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ int main() {
|
|||
server.resource["^/string$"]["POST"]=[](HttpServer::Response& response, shared_ptr<HttpServer::Request> 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue