From a3eafa54faa7fa470e3f6a562eabd4ed660453b9 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Tue, 26 Oct 2021 13:19:15 +0530 Subject: [PATCH] fix: test script not parsing json object if json content type --- packages/hoppscotch-app/helpers/RequestRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hoppscotch-app/helpers/RequestRunner.ts b/packages/hoppscotch-app/helpers/RequestRunner.ts index 62fb0379e..7caf1564d 100644 --- a/packages/hoppscotch-app/helpers/RequestRunner.ts +++ b/packages/hoppscotch-app/helpers/RequestRunner.ts @@ -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)