AxiosFn
约 158 字小于 1 分钟
2025-10-13
Karin API Docs / common / AxiosFn
类型别名: AxiosFn()
AxiosFn = {(
param
):Promise
\<AxiosResponse
<any
,any
\> |null
|undefined
>; (url
,type
,param?
):Promise
<AxiosResponse
<any
,any
> |null
|undefined
>; }
定义于: packages/core/src/utils/common/index.ts:27
调用签名
(
param
):Promise
<AxiosResponse
<any
,any
> |null
|undefined
>
对axios进行简单封装,超时、错误后返回null,不会抛出异常
参数
param
AxiosRequestConfig
axios参数
返回
Promise
<AxiosResponse
<any
, any
> | null
| undefined
>
调用签名
(
url
,type
,param?
):Promise
<AxiosResponse
<any
,any
> |null
|undefined
>
对axios进行简单封装,超时、错误后返回null,不会抛出异常
参数
url
string
请求地址
type
请求类型
"get"
| "post"
param?
AxiosRequestConfig<any>
axios参数
返回
Promise
<AxiosResponse
<any
, any
> | null
| undefined
>