Added convenience write functions to Server::response
This commit is contained in:
parent
d9faf1a6cb
commit
4efdc095bd
4 changed files with 101 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue