mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19: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()) {
|
||||
doc.shrinkToFit();
|
||||
char buffer[EMSESP_MAX_JSON_SIZE_LARGE];
|
||||
serializeJson(doc, buffer);
|
||||
serializeJsonPretty(doc, buffer);
|
||||
request->send(200, "text/plain", buffer);
|
||||
} else {
|
||||
request->send(200, "text/plain", ok ? F("OK") : F("Invalid"));
|
||||
|
||||
Reference in New Issue
Block a user