interface AxiosRequestConfig<D> {
    adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
    auth?: AxiosBasicCredentials;
    baseURL?: string;
    beforeRedirect?: ((options: Record<string, any>, responseDetails: {
        headers: Record<string, string>;
        statusCode: HttpStatusCode;
    }) => void);
    cancelToken?: CancelToken;
    data?: D;
    decompress?: boolean;
    env?: {
        FormData?: (new (...args: any[]) => object);
    };
    family?: AddressFamily;
    fetchOptions?: Record<string, any>;
    formSerializer?: FormSerializerOptions;
    headers?: AxiosHeaders | Partial<RawAxiosHeaders & {
        Accept: AxiosHeaderValue;
        Authorization: AxiosHeaderValue;
        Content-Encoding: AxiosHeaderValue;
        Content-Length: AxiosHeaderValue;
        User-Agent: AxiosHeaderValue;
    } & {
        Content-Type: ContentType;
    }> & Partial<{
        delete: AxiosHeaders;
        get: AxiosHeaders;
        head: AxiosHeaders;
        link: AxiosHeaders;
        options: AxiosHeaders;
        patch: AxiosHeaders;
        post: AxiosHeaders;
        purge: AxiosHeaders;
        put: AxiosHeaders;
        unlink: AxiosHeaders;
    } & {
        common: AxiosHeaders;
    }>;
    httpAgent?: any;
    httpsAgent?: any;
    insecureHTTPParser?: boolean;
    lookup?: ((hostname: string, options: object, cb: ((err: null | Error, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void)) => void) | ((hostname: string, options: object) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>);
    maxBodyLength?: number;
    maxContentLength?: number;
    maxRate?: number | [number, number];
    maxRedirects?: number;
    method?: string;
    onDownloadProgress?: ((progressEvent: AxiosProgressEvent) => void);
    onUploadProgress?: ((progressEvent: AxiosProgressEvent) => void);
    params?: any;
    paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
    proxy?: false | AxiosProxyConfig;
    responseEncoding?: string;
    responseType?: ResponseType;
    signal?: GenericAbortSignal;
    socketPath?: null | string;
    timeout?: number;
    timeoutErrorMessage?: string;
    transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
    transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
    transitional?: TransitionalOptions;
    transport?: any;
    url?: string;
    validateStatus?: null | ((status: number) => boolean);
    withCredentials?: boolean;
    withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig<any>) => undefined | boolean);
    xsrfCookieName?: string;
    xsrfHeaderName?: string;
}

Type Parameters

  • D = any

Hierarchy (view full)

Properties

baseURL?: string
beforeRedirect?: ((options: Record<string, any>, responseDetails: {
    headers: Record<string, string>;
    statusCode: HttpStatusCode;
}) => void)
cancelToken?: CancelToken
data?: D
decompress?: boolean
env?: {
    FormData?: (new (...args: any[]) => object);
}
family?: AddressFamily
fetchOptions?: Record<string, any>
formSerializer?: FormSerializerOptions
headers?: AxiosHeaders | Partial<RawAxiosHeaders & {
    Accept: AxiosHeaderValue;
    Authorization: AxiosHeaderValue;
    Content-Encoding: AxiosHeaderValue;
    Content-Length: AxiosHeaderValue;
    User-Agent: AxiosHeaderValue;
} & {
    Content-Type: ContentType;
}> & Partial<{
    delete: AxiosHeaders;
    get: AxiosHeaders;
    head: AxiosHeaders;
    link: AxiosHeaders;
    options: AxiosHeaders;
    patch: AxiosHeaders;
    post: AxiosHeaders;
    purge: AxiosHeaders;
    put: AxiosHeaders;
    unlink: AxiosHeaders;
} & {
    common: AxiosHeaders;
}>
httpAgent?: any
httpsAgent?: any
insecureHTTPParser?: boolean
lookup?: ((hostname: string, options: object, cb: ((err: null | Error, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void)) => void) | ((hostname: string, options: object) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>)
maxBodyLength?: number
maxContentLength?: number
maxRate?: number | [number, number]
maxRedirects?: number
method?: string
onDownloadProgress?: ((progressEvent: AxiosProgressEvent) => void)
onUploadProgress?: ((progressEvent: AxiosProgressEvent) => void)
params?: any
proxy?: false | AxiosProxyConfig
responseEncoding?: string
responseType?: ResponseType
socketPath?: null | string
timeout?: number
timeoutErrorMessage?: string
transitional?: TransitionalOptions
transport?: any
url?: string
validateStatus?: null | ((status: number) => boolean)
withCredentials?: boolean
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig<any>) => undefined | boolean)
xsrfCookieName?: string
xsrfHeaderName?: string