Make crow pretty print json responses
While not ideal for a real deployment, making crow "pretty print" the
json values aids in debug, and only introduces a mild performance
degredation.
TestedBy: checking /redfish/v1/ and verifying that it publishes
correctly
Change-Id: I9dbaa3a0500ef762ef4408852511b0e9b74cbd1f
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/crow/include/crow/http_connection.h b/crow/include/crow/http_connection.h
index 87fa874..5cbe6ad 100644
--- a/crow/include/crow/http_connection.h
+++ b/crow/include/crow/http_connection.h
@@ -374,7 +374,7 @@
if (res.body.empty() && !res.json_value.empty()) {
res.json_mode();
- res.body = res.json_value.dump();
+ res.body = res.json_value.dump(4);
}
if (!statusCodes.count(res.code)) {