mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
API calls show pretty json format
This commit is contained in:
@@ -111,7 +111,7 @@ void EMSESPAPIService::emsespAPIService(AsyncWebServerRequest * request) {
|
|||||||
if (output.size()) {
|
if (output.size()) {
|
||||||
doc.shrinkToFit();
|
doc.shrinkToFit();
|
||||||
char buffer[EMSESP_MAX_JSON_SIZE_LARGE];
|
char buffer[EMSESP_MAX_JSON_SIZE_LARGE];
|
||||||
serializeJson(doc, buffer);
|
serializeJsonPretty(doc, buffer);
|
||||||
request->send(200, "text/plain", buffer);
|
request->send(200, "text/plain", buffer);
|
||||||
} else {
|
} else {
|
||||||
request->send(200, "text/plain", ok ? F("OK") : F("Invalid"));
|
request->send(200, "text/plain", ok ? F("OK") : F("Invalid"));
|
||||||
|
|||||||
Reference in New Issue
Block a user