diff --git a/lib/__internal/EngineService.js b/lib/__internal/EngineService.js index 6083948..b586977 100644 --- a/lib/__internal/EngineService.js +++ b/lib/__internal/EngineService.js @@ -51,7 +51,10 @@ class EngineService { ...newOptions, responseType: "buffer" }); - if (headers["content-type"] === "application/json") { + if ( + headers["content-type"] && + headers["content-type"].substring(0, 16) === "application/json" + ) { return JSON.parse(body.toString("utf-8")); } else { return body;