API 参考
正在准备搜索索引...
@142vip/axios
VipAxiosInstance
接口 VipAxiosInstance
VipAxios实例类型
继承自AxiosInstance,添加了自定义方法
提供了清除拦截器的方法
提供了获取默认配置的方法
interface
VipAxiosInstance
{
clearInterceptor
:
(
type
:
InterceptorType
)
=>
void
;
defaults
:
Omit
<
AxiosDefaults
<
any
>
,
"headers"
>
&
{
headers
:
HeadersDefaults
&
{
[
key
:
string
]:
AxiosHeaderValue
}
;
}
;
getConfig
:
()
=>
undefined
|
CreateAxiosDefaults
<
any
>
;
interceptors
:
{
request
:
AxiosInterceptorManager
<
InternalAxiosRequestConfig
<
any
>
>
;
response
:
AxiosInterceptorManager
<
AxiosResponse
<
any
,
any
>
>
;
}
;
create
(
config
?:
CreateAxiosDefaults
<
any
>
)
:
AxiosInstance
;
delete
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
get
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
getUri
(
config
?:
AxiosRequestConfig
<
any
>
)
:
string
;
head
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
options
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
patch
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
patchForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
post
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
postForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
put
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
putForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
request
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
config
:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
config
:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
;
}
层级
AxiosInstance
VipAxiosInstance
VipAxiosInstance
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
config
:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
VipAxiosInstance
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
索引
属性
clear
Interceptor
defaults
get
Config
interceptors
方法
create
delete
get
get
Uri
head
options
patch
patch
Form
post
post
Form
put
put
Form
request
属性
clear
Interceptor
clearInterceptor
:
(
type
:
InterceptorType
)
=>
void
defaults
defaults
:
Omit
<
AxiosDefaults
<
any
>
,
"headers"
>
&
{
headers
:
HeadersDefaults
&
{
[
key
:
string
]:
AxiosHeaderValue
}
;
}
get
Config
getConfig
:
()
=>
undefined
|
CreateAxiosDefaults
<
any
>
interceptors
interceptors
:
{
request
:
AxiosInterceptorManager
<
InternalAxiosRequestConfig
<
any
>
>
;
response
:
AxiosInterceptorManager
<
AxiosResponse
<
any
,
any
>
>
;
}
方法
create
create
(
config
?:
CreateAxiosDefaults
<
any
>
)
:
AxiosInstance
参数
可选
config
:
CreateAxiosDefaults
<
any
>
返回
AxiosInstance
delete
delete
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
get
get
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
get
Uri
getUri
(
config
?:
AxiosRequestConfig
<
any
>
)
:
string
参数
可选
config
:
AxiosRequestConfig
<
any
>
返回
string
head
head
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
options
options
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
patch
patch
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
patch
Form
patchForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
post
post
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
post
Form
postForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
put
put
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
put
Form
putForm
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
request
request
<
T
=
any
,
R
=
AxiosResponse
<
T
,
any
>
,
D
=
any
>
(
config
:
AxiosRequestConfig
<
D
>
,
)
:
Promise
<
R
>
类型参数
T
=
any
R
=
AxiosResponse
<
T
,
any
>
D
=
any
参数
config
:
AxiosRequestConfig
<
D
>
返回
Promise
<
R
>
显示设置
成员可见性
受保护
继承
外部
配色
自动
浅色
深色
目录
属性
clear
Interceptor
defaults
get
Config
interceptors
方法
create
delete
get
get
Uri
head
options
patch
patch
Form
post
post
Form
put
put
Form
request
API 参考
加载中……
VipAxios实例类型