Interface AxiosStatic

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

Hierarchy (view full)

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

Properties

Axios: typeof Axios
AxiosError: typeof AxiosError
AxiosHeaders: typeof AxiosHeaders
Cancel: CancelStatic
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>, "headers"> & {
    headers: HeadersDefaults & {
        [key: string]: AxiosHeaderValue;
    };
}

Type declaration

formToJSON: ((form) => object)

Type declaration

getAdapter: ((adapters) => AxiosAdapter)

Type declaration

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

Type declaration

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

Type declaration

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

      • T = any
      • D = any

      Parameters

      • payload: any

      Returns payload is AxiosError<T, D>

isCancel: (<T>(value) => value is CanceledError<T>)

Type declaration

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

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

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Parameters

    Returns string

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>

  • Type Parameters

    Parameters

    Returns Promise<R>