From 65d7fc9cf13686a028803235808eab833ea88dc6 Mon Sep 17 00:00:00 2001 From: supergrecko Date: Sat, 5 Dec 2020 00:09:23 +0100 Subject: [PATCH] fix: fix issue where body wasn't sent at all --- src/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.ts b/src/request.ts index 788e5c0..1782374 100644 --- a/src/request.ts +++ b/src/request.ts @@ -53,7 +53,7 @@ export async function request( const response = await fetch(url, { method: options.method, - body: hasBody ? undefined : JSON.stringify(options.body), + body: hasBody ? JSON.stringify(options.body) : undefined, headers: { 'Accept': 'application/json', 'Content-Type': 'application/json',