@aidc/utils
Advanced tools
Comparing version 0.5.44 to 0.5.45
@@ -109,3 +109,3 @@ var __create = Object.create; | ||
} | ||
if (data && ["POST", "PUT", "PATCH"].includes(method.toUpperCase())) { | ||
if (data && ["POST", "PUT", "PATCH", "DELETE"].includes(method.toUpperCase())) { | ||
if (contentType === "application/x-www-form-urlencoded") { | ||
@@ -112,0 +112,0 @@ requestOptions.body = encodeFormData(data); |
@@ -125,3 +125,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
} | ||
if (data && ['POST', 'PUT', 'PATCH'].includes(method.toUpperCase())) { | ||
if (data && ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method.toUpperCase())) { | ||
// 针对 Content-Type 为 application/x-www-form-urlencoded 的请求,将数据转换为 form-data | ||
@@ -128,0 +128,0 @@ if (contentType === 'application/x-www-form-urlencoded') { |
{ | ||
"name": "@aidc/utils", | ||
"version": "0.5.44", | ||
"version": "0.5.45", | ||
"main": "dist/cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
71647