Minor cleanup of post json example
This commit is contained in:
parent
8e5ff77421
commit
b44fdc8183
1 changed files with 3 additions and 5 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue