Added convenience write functions to Server::response

This commit is contained in:
eidheim 2017-06-22 21:46:01 +02:00
commit 4efdc095bd
4 changed files with 101 additions and 0 deletions

View file

@ -44,6 +44,10 @@ int main() {
//string content=ss.str();
*response << "HTTP/1.1 200 OK\r\nContent-Length: " << content.length() << "\r\n\r\n" << content;
// Alternatively, use one of the convenience functions, for instance:
// response->write(content);
};
//POST-example for the path /json, responds firstName+" "+lastName from the posted json