Where
`YoYoWiFiManager::POST(const char *server, const char *path, JsonVariant payload, char *response)` in `src/YoYoWiFiManager.cpp`:
```cpp
int YoYoWiFiManager::POST(const char *server, const char *path, JsonVariant payload, char *response) {
int httpResponseCode = -1;
String jsonAsString;
jsonAsString.reserve(payload.memoryUsage());
if(serializeJson(payload, jsonAsString) > 0) {
httpResponseCode = POST(server, path, jsonAsString.c_str(), "application/json", response);
if(response) {
//TODO: parse json
}
}
return(httpResponseCode);
}
```
Problem
When a caller passes a non-null `response` buffer, the inner `POST(..., char *response)` call already fills it with the raw response body (see #68 re: that copy being unbounded), but the `if(response) { //TODO: parse json }` block here does nothing with it - so this overload's whole reason for existing (JSON in, presumably JSON-parsed-out) isn't actually implemented, despite already having the raw string in hand.
Ask
Either parse `response` into a `JsonDocument` here (there's already a `GET(server, path, JsonDocument&)` overload nearby to use as a model), or change this overload's `response` parameter to a `JsonDocument&` to match, rather than a raw `char *` that never gets interpreted as JSON.
Where
`YoYoWiFiManager::POST(const char *server, const char *path, JsonVariant payload, char *response)` in `src/YoYoWiFiManager.cpp`:
```cpp
int YoYoWiFiManager::POST(const char *server, const char *path, JsonVariant payload, char *response) {
int httpResponseCode = -1;
String jsonAsString;
jsonAsString.reserve(payload.memoryUsage());
if(serializeJson(payload, jsonAsString) > 0) {
httpResponseCode = POST(server, path, jsonAsString.c_str(), "application/json", response);
if(response) {
//TODO: parse json
}
}
return(httpResponseCode);
}
```
Problem
When a caller passes a non-null `response` buffer, the inner `POST(..., char *response)` call already fills it with the raw response body (see #68 re: that copy being unbounded), but the `if(response) { //TODO: parse json }` block here does nothing with it - so this overload's whole reason for existing (JSON in, presumably JSON-parsed-out) isn't actually implemented, despite already having the raw string in hand.
Ask
Either parse `response` into a `JsonDocument` here (there's already a `GET(server, path, JsonDocument&)` overload nearby to use as a model), or change this overload's `response` parameter to a `JsonDocument&` to match, rather than a raw `char *` that never gets interpreted as JSON.