API 参考
    正在准备搜索索引...

    接口 VipAxiosInstance

    VipAxios实例类型

    • 继承自AxiosInstance,添加了自定义方法
    • 提供了清除拦截器的方法
    • 提供了获取默认配置的方法
    interface VipAxiosInstance {
        clearInterceptor: (type: InterceptorType) => void;
        defaults: Omit<AxiosDefaults<any, any>, "headers"> & {
            headers: HeadersDefaults & { [key: string]: AxiosHeaderValue };
        };
        getConfig: () => CreateAxiosDefaults<any, any> | undefined;
        interceptors: {
            request: AxiosInterceptorManager<InternalAxiosRequestConfig<any, any>>;
            response: AxiosInterceptorManager<AxiosResponse<any, any, {}, any>>;
        };
        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>>;
    }

    层级 (查看层级一览)

    索引
    clearInterceptor: (type: InterceptorType) => void
    defaults: Omit<AxiosDefaults<any, any>, "headers"> & {
        headers: HeadersDefaults & { [key: string]: AxiosHeaderValue };
    }
    getConfig: () => CreateAxiosDefaults<any, any> | undefined
    interceptors: {
        request: AxiosInterceptorManager<InternalAxiosRequestConfig<any, any>>;
        response: AxiosInterceptorManager<AxiosResponse<any, any, {}, any>>;
    }
    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 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

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>

    • 类型参数

      • T = any
      • R = typeof axiosResponseDefault
      • D = any
      • P = any

      参数

      返回 Promise<AxiosResponseResult<T, R, D, P>>