From 4bcab891b24853767ffe3af53a6cd564da97b7ab Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 3 Aug 2022 15:26:48 +0530 Subject: [PATCH] UI: Don't convert response to JSON before creating Response object in IslandHttpClient's put() --- monkey/monkey_island/cc/ui/src/components/IslandHttpClient.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/IslandHttpClient.tsx b/monkey/monkey_island/cc/ui/src/components/IslandHttpClient.tsx index ef8d8adf5..11e6387b7 100644 --- a/monkey/monkey_island/cc/ui/src/components/IslandHttpClient.tsx +++ b/monkey/monkey_island/cc/ui/src/components/IslandHttpClient.tsx @@ -20,7 +20,7 @@ class IslandHttpClient extends AuthComponent { headers: {'Content-Type': 'application/json'}, body: JSON.stringify(contents) }) - .then(res => {status = res.status; return res.json()}) + .then(res => {status = res.status; return res}) .then(res => new Response(res, status)); }