fix for issues #220 and #286

When responseType is set to json, the data should be returned as plain json string, not as a base64 encoded string.
This commit is contained in:
antikalk
2020-01-29 20:14:06 +01:00
parent 39fa17e4ed
commit b6f369b868
2 changed files with 2 additions and 2 deletions
@@ -193,7 +193,7 @@ abstract class CordovaHttpBase implements Runnable {
response.setHeaders(request.headers());
if (request.code() >= 200 && request.code() < 300) {
if ("text".equals(this.responseType)) {
if ("text".equals(this.responseType) || "json".equals(this.responseType)) {
String decoded = HttpBodyDecoder.decodeBody(outputStream.toByteArray(), request.charset());
response.setBody(decoded);
} else {