Interface AxiosStatic

interface AxiosStatic {
    Axios: typeof Axios;
    AxiosError: typeof AxiosError;
    AxiosHeaders: typeof AxiosHeaders;
    Cancel: typeof CanceledError;
    CancelToken: CancelTokenStatic;
    CanceledError: typeof CanceledError;
    HttpStatusCode: typeof HttpStatusCode;
    VERSION: string;
    all: (<T>(values) => Promise<T[]>);
    defaults: Omit<AxiosDefaults<any, any>, "headers"> & {
        headers: HeadersDefaults & {
            [key: string]: AxiosHeaderValue;
        };
    };
    formToJSON: ((form) => object);
    getAdapter: ((adapters) => AxiosAdapter);
    interceptors: {
        request: AxiosInterceptorManager<InternalAxiosRequestConfig<any, any>>;
        response: AxiosInterceptorManager<AxiosResponse<any, any, {}, any>>;
    };
    isAxiosError: (<T, D, P>(payload) => payload is AxiosError<T, D, P>);
    isCancel: (<T, D, P>(value) => value is CanceledError<T, D, P>);
    mergeConfig: (<D, P>(config1, config2) => AxiosRequestConfig<D, P>);
    spread: (<T, R>(callback) => ((array) => R));
    toFormData: ((sourceObj, targetFormData?, options?) => GenericFormData);
    create(config?): AxiosInstance;
    delete<T, R, D, P>(url, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    get<T, R, D, P>(url, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    getUri(config?): string;
    head<T, R, D, P>(url, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    options<T, R, D, P>(url, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    patch<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    patchForm<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    post<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    postForm<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    put<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    putForm<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    query<T, R, D, P>(url, data?, config?): Promise<AxiosResponseResult<T, R, D, P>>;
    request<T, R, D, P>(config): Promise<AxiosResponseResult<T, R, D, P>>;
    <T, R, D, P>(config): Promise<AxiosResponseResult<T, R, D, P>>;
    <T, R, D, P>(url, config?): Promise<AxiosResponseResult<T, R, D, P>>;
}

Hierarchy (view full)

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

Properties

Axios: typeof Axios
AxiosError: typeof AxiosError
AxiosHeaders: typeof AxiosHeaders
Cancel: typeof CanceledError
CancelToken: CancelTokenStatic
CanceledError: typeof CanceledError
HttpStatusCode: typeof HttpStatusCode
VERSION: string
all: (<T>(values) => Promise<T[]>)

Type declaration

    • <T>(values): Promise<T[]>
    • Type Parameters

      • T

      Parameters

      • values: (T | Promise<T>)[]

      Returns Promise<T[]>

defaults: Omit<AxiosDefaults<any, any>, "headers"> & {
    headers: HeadersDefaults & {
        [key: string]: AxiosHeaderValue;
    };
}

Type declaration

formToJSON: ((form) => object)

Type declaration

getAdapter: ((adapters) => AxiosAdapter)

Type declaration

interceptors: {
    request: AxiosInterceptorManager<InternalAxiosRequestConfig<any, any>>;
    response: AxiosInterceptorManager<AxiosResponse<any, any, {}, any>>;
}

Type declaration

isAxiosError: (<T, D, P>(payload) => payload is AxiosError<T, D, P>)

Type declaration

    • <T, D, P>(payload): payload is AxiosError<T, D, P>
    • Type Parameters

      • T = any
      • D = any
      • P = any

      Parameters

      • payload: any

      Returns payload is AxiosError<T, D, P>

isCancel: (<T, D, P>(value) => value is CanceledError<T, D, P>)

Type declaration

mergeConfig: (<D, P>(config1, config2) => AxiosRequestConfig<D, P>)

Type declaration

spread: (<T, R>(callback) => ((array) => R))

Type declaration

    • <T, R>(callback): ((array) => R)
    • Type Parameters

      • T
      • R

      Parameters

      • callback: ((...args) => R)
          • (...args): R
          • Parameters

            • Rest ...args: T[]

            Returns R

      Returns ((array) => R)

        • (array): R
        • Parameters

          • array: T[]

          Returns R

toFormData: ((sourceObj, targetFormData?, options?) => GenericFormData)

Type declaration

Methods

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Parameters

    Returns string

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>

  • Type Parameters

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

    Parameters

    Returns Promise<AxiosResponseResult<T, R, D, P>>