From f14f43c1cce9de0e3b85db59317635ba6339c882 Mon Sep 17 00:00:00 2001 From: Jan Pingel Date: Fri, 30 Apr 2021 18:44:35 -0700 Subject: [PATCH] Fix multipart/form-data being handled as json Do not add application/json content-type header or stringify the body when the body is an instanceof FormData. --- src/browser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser.js b/src/browser.js index d41fb0f..da7701d 100644 --- a/src/browser.js +++ b/src/browser.js @@ -46,6 +46,7 @@ const mkrequest = (statusCodes, method, encoding, headers, baseurl) => async (_u if (body) { if (body instanceof ArrayBuffer || + body instanceof FormData || ArrayBuffer.isView(body) || typeof body === 'string' ) {