Further cleanup of examples

This commit is contained in:
eidheim 2017-06-23 16:28:25 +02:00
commit 0a72f6f280
2 changed files with 2 additions and 4 deletions

View file

@ -127,8 +127,7 @@ int main() {
server.resource["^/work$"]["GET"]=[](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> /*request*/) {
thread work_thread([response] {
this_thread::sleep_for(chrono::seconds(5));
string message="Work done";
*response << "HTTP/1.1 200 OK\r\nContent-Length: " << message.length() << "\r\n\r\n" << message;
response->write("Work done");
});
work_thread.detach();
};