Commit 27a2353c authored by zbz's avatar zbz Committed by 陈帅

修正DELETE请求方法request时body参数无效的BUG

parent 7ffc34b3
...@@ -47,7 +47,7 @@ export default function request(url, options) { ...@@ -47,7 +47,7 @@ export default function request(url, options) {
credentials: 'include', credentials: 'include',
}; };
const newOptions = { ...defaultOptions, ...options }; 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)) { if (!(newOptions.body instanceof FormData)) {
newOptions.headers = { newOptions.headers = {
Accept: 'application/json', Accept: 'application/json',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment