@whitesev/utils 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/utils",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "一个常用的工具库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/Httpx.ts CHANGED
@@ -544,10 +544,8 @@ class Httpx {
544
544
  });
545
545
  if (ContentTypeIndex !== -1) {
546
546
  let ContentTypeKey = headersKeyList[ContentTypeIndex];
547
+ let ContentType = requestOption.headers[ContentTypeKey] as string;
547
548
  // 设置了Content-Type
548
- let ContentType = requestOption.headers[
549
- ContentTypeIndex
550
- ].toLowerCase() as string;
551
549
  if (ContentType.includes("application/json")) {
552
550
  // application/json
553
551
  if (requestOption.data instanceof FormData) {