From b44fdc8183293ef1c7a1f44534664142f269b643 Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 7 Sep 2016 09:59:04 +0200 Subject: [PATCH] Minor cleanup of post json example --- http_examples.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/http_examples.cpp b/http_examples.cpp index 27ff275..b9dce7d 100644 --- a/http_examples.cpp +++ b/http_examples.cpp @@ -57,11 +57,9 @@ int main() { string name=pt.get("firstName")+" "+pt.get("lastName"); - *response << "HTTP/1.1 200 OK" << "\r\n" - << "Access-Control-Allow-Origin: *" << "\r\n" - << "Content-Type: application/json" << "\r\n" - << "Content-Length: " << name.length() << "\r\n" - << "\r\n" + *response << "HTTP/1.1 200 OK\r\n" + << "Content-Type: application/json\r\n" + << "Content-Length: " << name.length() << "\r\n\r\n" << name; } catch(exception& e) {