diff options
author | Antony Woods <acron1@gmail.com> | 2014-12-10 17:29:31 +0000 |
---|---|---|
committer | Antony Woods <acron1@gmail.com> | 2014-12-10 17:29:31 +0000 |
commit | c2f75a7de1eaa9a0e1a5a97b5fc1ee60c8c3a642 (patch) | |
tree | fed6ff698f211cca192e68d954c577cac9134a97 /include/http_response.h | |
parent | 693aac108de4dc62811b9a2737d895ada474cfb2 (diff) | |
parent | 21b027774e4c472d27d8726774aad1aaed95ea42 (diff) | |
download | crow-c2f75a7de1eaa9a0e1a5a97b5fc1ee60c8c3a642.tar.gz crow-c2f75a7de1eaa9a0e1a5a97b5fc1ee60c8c3a642.zip |
Merged upstream
Diffstat (limited to 'include/http_response.h')
-rw-r--r-- | include/http_response.h | 5 |
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) { |