From 27a2353c93853cd88d4fdb6a3269f0a17f289a09 Mon Sep 17 00:00:00 2001 From: zbz Date: Tue, 12 Jun 2018 15:19:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3DELETE=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=96=B9=E6=B3=95request=E6=97=B6body=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request.js b/src/utils/request.js index 591da964..af1aaf74 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -47,7 +47,7 @@ export default function request(url, options) { credentials: 'include', }; const newOptions = { ...defaultOptions, ...options }; - if (newOptions.method === 'POST' || newOptions.method === 'PUT') { + if (newOptions.method === 'POST' || newOptions.method === 'PUT' || newOptions.method === 'DELETE') { if (!(newOptions.body instanceof FormData)) { newOptions.headers = { Accept: 'application/json', -- GitLab