Merge pull request #90 from SamuelMarks/json_res_status

[Feature] JSON response can now include status code
This commit is contained in:
Jaeseung Ha 2015-09-30 17:33:52 +09:00
commit 6a4e80811a
2 changed files with 8 additions and 0 deletions

View File

@ -6274,6 +6274,10 @@ namespace crow
{ {
json_mode(); json_mode();
} }
response(int code, const json::wvalue& json_value) : code(code), body(json::dump(json_value))
{
json_mode();
}
response(response&& r) response(response&& r)
{ {

View File

@ -49,6 +49,10 @@ namespace crow
{ {
json_mode(); json_mode();
} }
response(int code, const json::wvalue& json_value) : code(code), body(json::dump(json_value))
{
json_mode();
}
response(response&& r) response(response&& r)
{ {