fix: test script not parsing json object if json content type
This commit is contained in:
@@ -17,7 +17,7 @@ import { getRESTRequest, setRESTTestResults } from "~/newstore/RESTSession"
|
|||||||
|
|
||||||
const getTestableBody = (res: HoppRESTResponse & { type: "success" }) => {
|
const getTestableBody = (res: HoppRESTResponse & { type: "success" }) => {
|
||||||
const contentTypeHeader = res.headers.find(
|
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)
|
const rawBody = new TextDecoder("utf-8").decode(res.body)
|
||||||
|
|||||||
Reference in New Issue
Block a user