From 55dd19eb810da007488e996ae91af16dabfd4a0b Mon Sep 17 00:00:00 2001 From: Samuel Marks Date: Sun, 27 Sep 2015 13:33:09 +1000 Subject: [Feature] JSON response can now include status code --- include/http_response.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/http_response.h') diff --git a/include/http_response.h b/include/http_response.h index 0ce2916..a7b63bf 100644 --- a/include/http_response.h +++ b/include/http_response.h @@ -49,6 +49,10 @@ namespace crow { json_mode(); } + response(int code, const json::wvalue& json_value) : code(code), body(json::dump(json_value)) + { + json_mode(); + } response(response&& r) { -- cgit v1.2.3-54-g00ecf