🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

complex-request

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complex-request - npm Package Compare versions

Comparing version
0.5.6
to
0.5.7
+1
-1
history.md
### ToDo
- 刷新Token实现
### 0.5.6
### 0.5.6/7
- failNotice => fail

@@ -6,0 +6,0 @@ - failNotice.local => fail.intercept

{
"name": "complex-request",
"version": "0.5.6",
"version": "0.5.7",
"description": "a complex request",

@@ -5,0 +5,0 @@ "main": "index.ts",

@@ -95,7 +95,7 @@ import { _Data, jsonToForm } from "complex-utils"

type: 'error',
title: '请求失败',
title: '请求错误'
},
server: {
type: 'error',
title: '请求错误',
title: '请求失败'
},

@@ -145,2 +145,5 @@ } as Record<totalFailType, failOption>

const targetType = requestConfig.targetType || 'json'
if (requestConfig.currentType == undefined) {
requestConfig.currentType = 'json'
}
const $contentType = (this.constructor as typeof BaseRequest).$contentType

@@ -169,5 +172,2 @@ const defaultContentType = targetType === 'json' ? $contentType.json : $contentType.form

requestConfig.currentType = targetType
if (requestConfig.currentType == undefined) {
requestConfig.currentType = 'json'
}
if (requestConfig.token == undefined) {

@@ -174,0 +174,0 @@ requestConfig.token = true