From d8ce3fcad5e49acb6f630fb18a0c52a97143df6c Mon Sep 17 00:00:00 2001 From: bbrotosumpeno Date: Tue, 8 Feb 2022 19:05:12 +0100 Subject: [PATCH] Issue-80 Use includes for Content_type_json instead of strict equals --- src/core/http_client/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/http_client/client.ts b/src/core/http_client/client.ts index bb1c081..ebf9d8c 100644 --- a/src/core/http_client/client.ts +++ b/src/core/http_client/client.ts @@ -47,7 +47,7 @@ async function translateResponse( if (buf.length === 0) { responseBodyType = 'empty'; responseBodyValue = undefined; - } else if (saidContentType === CONTENT_TYPE_JSON) { + } else if (saidContentType?.includes(CONTENT_TYPE_JSON)) { responseBodyType = 'json'; responseBodyValue = toJson(buf); } else if (saidContentType?.includes(CONTENT_TYPE_HTML)) {