Minor cleanup of post json example

This commit is contained in:
eidheim 2016-09-07 09:59:04 +02:00
commit b44fdc8183

View file

@ -57,11 +57,9 @@ int main() {
string name=pt.get<string>("firstName")+" "+pt.get<string>("lastName"); string name=pt.get<string>("firstName")+" "+pt.get<string>("lastName");
*response << "HTTP/1.1 200 OK" << "\r\n" *response << "HTTP/1.1 200 OK\r\n"
<< "Access-Control-Allow-Origin: *" << "\r\n" << "Content-Type: application/json\r\n"
<< "Content-Type: application/json" << "\r\n" << "Content-Length: " << name.length() << "\r\n\r\n"
<< "Content-Length: " << name.length() << "\r\n"
<< "\r\n"
<< name; << name;
} }
catch(exception& e) { catch(exception& e) {