Skip to content

API 参考 / @142vip/axios / VipAxiosInstance

接口: VipAxiosInstance() ​

定义于: packages/axios/src/core/axios.factory.ts:11

VipAxios实例类型

  • 继承自AxiosInstance,添加了自定义方法
  • 提供了清除拦截器的方法
  • 提供了获取默认配置的方法

theme_extends ​

  • AxiosInstance

调用签名 ​

VipAxiosInstance<T, R, D>(config): Promise<R>

定义于: packages/axios/src/core/axios.factory.ts:11

VipAxios实例类型

  • 继承自AxiosInstance,添加了自定义方法
  • 提供了清除拦截器的方法
  • 提供了获取默认配置的方法

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

config ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

调用签名 ​

VipAxiosInstance<T, R, D>(url, config?): Promise<R>

定义于: packages/axios/src/core/axios.factory.ts:11

VipAxios实例类型

  • 继承自AxiosInstance,添加了自定义方法
  • 提供了清除拦截器的方法
  • 提供了获取默认配置的方法

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

属性 ​

clearInterceptor ​

clearInterceptor: (type) => void

定义于: packages/axios/src/core/axios.factory.ts:12

参数 ​

type ​

InterceptorType

返回 ​

void


defaults ​

defaults: Omit<AxiosDefaults<any>, "headers"> & object

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:672

类型声明 ​

headers ​

headers: HeadersDefaults & object

继承自 ​

AxiosInstance.defaults


getConfig ​

getConfig: () => CreateAxiosDefaults<any> | undefined

定义于: packages/axios/src/core/axios.factory.ts:13

返回 ​

CreateAxiosDefaults<any> | undefined


interceptors ​

interceptors: object

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:608

request ​

request: AxiosInterceptorManager<InternalAxiosRequestConfig<any>>

response ​

response: AxiosInterceptorManager<AxiosResponse<any, any, { }>>

继承自 ​

AxiosInstance.interceptors

方法 ​

create() ​

create(config?): AxiosInstance

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:671

参数 ​

config? ​

CreateAxiosDefaults<any>

返回 ​

AxiosInstance

继承自 ​

AxiosInstance.create


delete() ​

delete<T, R, D>(url, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:618

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.delete


get() ​

get<T, R, D>(url, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:614

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.get


getUri() ​

getUri(config?): string

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:612

参数 ​

config? ​

AxiosRequestConfig<any>

返回 ​

string

继承自 ​

AxiosInstance.getUri


head<T, R, D>(url, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:622

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.head


options() ​

options<T, R, D>(url, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:626

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.options


patch() ​

patch<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:640

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.patch


patchForm() ​

patchForm<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:655

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.patchForm


post() ​

post<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:630

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.post


postForm() ​

postForm<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:645

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.postForm


put() ​

put<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:635

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.put


putForm() ​

putForm<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:650

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.putForm


query() ​

query<T, R, D>(url, data?, config?): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:660

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

url ​

string

data? ​

D

config? ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.query


request() ​

request<T, R, D>(config): Promise<R>

定义于: node_modules/.pnpm/axios@1.17.0/node_modules/axios/index.d.ts:613

类型参数 ​

T ​

T = any

R ​

R = AxiosResponse<T, any, { }>

D ​

D = any

参数 ​

config ​

AxiosRequestConfig<D>

返回 ​

Promise<R>

继承自 ​

AxiosInstance.request