API 参考
正在准备搜索索引...
@142vip/axios
AxiosStatic
接口 AxiosStatic
interface
AxiosStatic
{
all
:
<
T
>
(
values
:
(
T
|
Promise
<
T
>
)
[]
)
=>
Promise
<
T
[]
>
;
Axios
:
typeof
Axios
;
AxiosError
:
typeof
AxiosError
;
AxiosHeaders
:
typeof
AxiosHeaders
;
Cancel
:
typeof
CanceledError
;
CanceledError
:
typeof
CanceledError
;
CancelToken
:
CancelTokenStatic
;
defaults
:
Omit
<
AxiosDefaults
<
any
,
any
>
,
"headers"
>
&
{
headers
:
HeadersDefaults
&
{
[
key
:
string
]:
AxiosHeaderValue
}
;
}
;
formToJSON
:
(
form
:
GenericFormData
|
GenericHTMLFormElement
)
=>
object
;
getAdapter
:
(
adapters
:
AxiosAdapterConfig
|
AxiosAdapterConfig
[]
|
undefined
,
)
=>
AxiosAdapter
;
HttpStatusCode
:
typeof
HttpStatusCode
;
interceptors
:
{
request
:
AxiosInterceptorManager
<
InternalAxiosRequestConfig
<
any
,
any
>
>
;
response
:
AxiosInterceptorManager
<
AxiosResponse
<
any
,
any
,
{}
,
any
>
>
;
}
;
isAxiosError
:
<
T
=
any
,
D
=
any
,
P
=
any
>
(
payload
:
any
,
)
=>
payload
is
AxiosError
<
T
,
D
,
P
>
;
isCancel
:
<
T
=
any
,
D
=
any
,
P
=
any
>
(
value
:
any
,
)
=>
value
is
CanceledError
<
T
,
D
,
P
>
;
mergeConfig
:
<
D
=
any
,
P
=
any
>
(
config1
:
AxiosRequestConfig
<
D
,
P
>
,
config2
:
AxiosRequestConfig
<
D
,
P
>
,
)
=>
AxiosRequestConfig
<
D
,
P
>
;
spread
:
<
T
,
R
>
(
callback
:
(
...
args
:
T
[]
)
=>
R
)
=>
(
array
:
T
[]
)
=>
R
;
toFormData
:
(
sourceObj
:
object
,
targetFormData
?:
GenericFormData
,
options
?:
FormSerializerOptions
,
)
=>
GenericFormData
;
VERSION
:
string
;
create
(
config
?:
CreateAxiosDefaults
<
any
,
any
>
)
:
AxiosInstance
;
delete
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
get
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
getUri
(
config
?:
AxiosRequestConfig
<
any
,
any
>
)
:
string
;
head
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
options
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
patch
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
patchForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
post
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
postForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
put
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
putForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
query
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
request
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
config
:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
config
:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
;
}
层级 (
查看层级一览
)
AxiosInstance
AxiosStatic
AxiosStatic
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
config
:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
AxiosStatic
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
索引
属性
all
Axios
Axios
Error
Axios
Headers
Cancel
Canceled
Error
Cancel
Token
defaults
form
To
JSON
get
Adapter
Http
Status
Code
interceptors
is
Axios
Error
is
Cancel
merge
Config
spread
to
Form
Data
VERSION
方法
create
delete
get
get
Uri
head
options
patch
patch
Form
post
post
Form
put
put
Form
query
request
属性
all
all
:
<
T
>
(
values
:
(
T
|
Promise
<
T
>
)
[]
)
=>
Promise
<
T
[]
>
Axios
Axios
:
typeof
Axios
Axios
Error
AxiosError
:
typeof
AxiosError
Axios
Headers
AxiosHeaders
:
typeof
AxiosHeaders
Cancel
Cancel
:
typeof
CanceledError
Canceled
Error
CanceledError
:
typeof
CanceledError
Cancel
Token
CancelToken
:
CancelTokenStatic
defaults
defaults
:
Omit
<
AxiosDefaults
<
any
,
any
>
,
"headers"
>
&
{
headers
:
HeadersDefaults
&
{
[
key
:
string
]:
AxiosHeaderValue
}
;
}
form
To
JSON
formToJSON
:
(
form
:
GenericFormData
|
GenericHTMLFormElement
)
=>
object
get
Adapter
getAdapter
:
(
adapters
:
AxiosAdapterConfig
|
AxiosAdapterConfig
[]
|
undefined
,
)
=>
AxiosAdapter
Http
Status
Code
HttpStatusCode
:
typeof
HttpStatusCode
interceptors
interceptors
:
{
request
:
AxiosInterceptorManager
<
InternalAxiosRequestConfig
<
any
,
any
>
>
;
response
:
AxiosInterceptorManager
<
AxiosResponse
<
any
,
any
,
{}
,
any
>
>
;
}
is
Axios
Error
isAxiosError
:
<
T
=
any
,
D
=
any
,
P
=
any
>
(
payload
:
any
,
)
=>
payload
is
AxiosError
<
T
,
D
,
P
>
is
Cancel
isCancel
:
<
T
=
any
,
D
=
any
,
P
=
any
>
(
value
:
any
,
)
=>
value
is
CanceledError
<
T
,
D
,
P
>
merge
Config
mergeConfig
:
<
D
=
any
,
P
=
any
>
(
config1
:
AxiosRequestConfig
<
D
,
P
>
,
config2
:
AxiosRequestConfig
<
D
,
P
>
,
)
=>
AxiosRequestConfig
<
D
,
P
>
spread
spread
:
<
T
,
R
>
(
callback
:
(
...
args
:
T
[]
)
=>
R
)
=>
(
array
:
T
[]
)
=>
R
to
Form
Data
toFormData
:
(
sourceObj
:
object
,
targetFormData
?:
GenericFormData
,
options
?:
FormSerializerOptions
,
)
=>
GenericFormData
只读
VERSION
VERSION
:
string
方法
create
create
(
config
?:
CreateAxiosDefaults
<
any
,
any
>
)
:
AxiosInstance
参数
可选
config
:
CreateAxiosDefaults
<
any
,
any
>
返回
AxiosInstance
delete
delete
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
get
get
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
get
Uri
getUri
(
config
?:
AxiosRequestConfig
<
any
,
any
>
)
:
string
参数
可选
config
:
AxiosRequestConfig
<
any
,
any
>
返回
string
head
head
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
options
options
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
patch
patch
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
patch
Form
patchForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
post
post
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
post
Form
postForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
put
put
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
put
Form
putForm
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
query
query
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
url
:
string
,
data
?:
D
,
config
?:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
url
:
string
可选
data
:
D
可选
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
request
request
<
T
=
any
,
R
=
typeof
axiosResponseDefault
,
D
=
any
,
P
=
any
>
(
config
:
AxiosRequestConfig
<
D
,
P
>
,
)
:
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
类型参数
T
=
any
R
=
typeof
axiosResponseDefault
D
=
any
P
=
any
参数
config
:
AxiosRequestConfig
<
D
,
P
>
返回
Promise
<
AxiosResponseResult
<
T
,
R
,
D
,
P
>
>
显示设置
成员可见性
受保护
继承
外部
配色
自动
浅色
深色
目录
属性
all
Axios
Axios
Error
Axios
Headers
Cancel
Canceled
Error
Cancel
Token
defaults
form
To
JSON
get
Adapter
Http
Status
Code
interceptors
is
Axios
Error
is
Cancel
merge
Config
spread
to
Form
Data
VERSION
方法
create
delete
get
get
Uri
head
options
patch
patch
Form
post
post
Form
put
put
Form
query
request
API 参考
加载中……