From d52d6366418897133dab0ca668352ca160cccab9 Mon Sep 17 00:00:00 2001 From: Helloyunho Date: Mon, 3 May 2021 20:54:39 +0900 Subject: [PATCH] :bug: Fix setting contentType even tho there's no body --- src/rest/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/request.ts b/src/rest/request.ts index 273eadb..ca26850 100644 --- a/src/rest/request.ts +++ b/src/rest/request.ts @@ -90,7 +90,7 @@ export class APIRequest { ) form.append('payload_json', JSON.stringify(body)) body = form - } else { + } else if (body !== undefined) { contentType = 'application/json' body = JSON.stringify(body) }