fix: test script not parsing json object if json content type

This commit is contained in:
Andrew Bastin
2021-10-26 13:19:15 +05:30
parent b90b4a1910
commit a3eafa54fa

View File

@@ -17,7 +17,7 @@ import { getRESTRequest, setRESTTestResults } from "~/newstore/RESTSession"
const getTestableBody = (res: HoppRESTResponse & { type: "success" }) => {
const contentTypeHeader = res.headers.find(
(h) => h.value.toLowerCase() === "content-type"
(h) => h.key.toLowerCase() === "content-type"
)
const rawBody = new TextDecoder("utf-8").decode(res.body)