aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAntony Woods <acron1@gmail.com>2014-11-06 14:16:07 +0000
committerAntony Woods <acron1@gmail.com>2014-11-06 14:16:07 +0000
commit5120b127b0c167e11c9f7c8495b5b407aea32d76 (patch)
treec87baab77204e38937c0a24f5dfc567e96785a8f /include
parent6d24711208e60ad4ef85c2d055bd49af120e8f77 (diff)
parentccc5845c3e52814d28a2baf2cd90c6cd67c58e2c (diff)
downloadcrow-5120b127b0c167e11c9f7c8495b5b407aea32d76.tar.gz
crow-5120b127b0c167e11c9f7c8495b5b407aea32d76.zip
Merged changes from master
Diffstat (limited to 'include')
-rw-r--r--include/http_response.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/http_response.h b/include/http_response.h
index 7288cc3..807e6ac 100644
--- a/include/http_response.h
+++ b/include/http_response.h
@@ -41,8 +41,11 @@ namespace crow
explicit response(int code) : code(code) {}
response(std::string body) : body(std::move(body)) {}
response(json::wvalue&& json_value) : json_value(std::move(json_value)) {}
- response(const json::wvalue& json_value) : body(json::dump(json_value)) {}
response(int code, std::string body) : body(std::move(body)), code(code) {}
+ response(const json::wvalue& json_value) : body(json::dump(json_value))
+ {
+ set_header("Content-Type", "application/json");
+ }
response(response&& r)
{