From 7e9d42d7f86982318bf9b37d136e9b18b4f586a9 Mon Sep 17 00:00:00 2001 From: Andreas Fink Date: Thu, 20 Oct 2022 22:30:31 +0200 Subject: [PATCH] fix: only send Content-Type header to proxy if body content is sent (#2536) --- rest/runMethod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/runMethod.ts b/rest/runMethod.ts index 2f72054cc..3f9a0874e 100644 --- a/rest/runMethod.ts +++ b/rest/runMethod.ts @@ -50,7 +50,7 @@ export async function runMethod( body: body ? JSON.stringify(body) : undefined, headers: { Authorization: rest.secretKey, - "Content-Type": "application/json", + "Content-Type": body ? "application/json" : undefined, }, method, });