Interface AxiosRequestConfig<D>

interface AxiosRequestConfig {
    adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
    auth?: AxiosBasicCredentials;
    baseURL?: string;
    beforeRedirect?: ((options, responseDetails) => void);
    cancelToken?: CancelToken;
    data?: D;
    decompress?: boolean;
    env?: {
        FormData?: (new (...args) => object);
    };
    family?: AddressFamily;
    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, options, cb) => void) | ((hostname, options) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>);
    maxBodyLength?: number;
    maxContentLength?: number;
    maxRate?: number | [number, number];
    maxRedirects?: number;
    method?: string;
    onDownloadProgress?: ((progressEvent) => void);
    onUploadProgress?: ((progressEvent) => 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) => boolean);
    withCredentials?: boolean;
    withXSRFToken?: boolean | ((config) => undefined | boolean);
    xsrfCookieName?: string;
    xsrfHeaderName?: string;
}

Type Parameters

  • D = any

Hierarchy

Properties

baseURL?: string
beforeRedirect?: ((options, responseDetails) => void)

Type declaration

    • (options, responseDetails): void
    • Parameters

      • options: Record<string, any>
      • responseDetails: {
            headers: Record<string, string>;
        }
        • headers: Record<string, string>

      Returns void

cancelToken?: CancelToken
data?: D
decompress?: boolean
env?: {
    FormData?: (new (...args) => object);
}

Type declaration

  • Optional FormData?: (new (...args) => object)
      • new (...args): object
      • Parameters

        • Rest ...args: any[]

        Returns object

family?: AddressFamily
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, options, cb) => void) | ((hostname, options) => Promise<LookupAddress | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]>)

Type declaration

    • (hostname, options, cb): void
    • Parameters

      Returns void

Type declaration

maxBodyLength?: number
maxContentLength?: number
maxRate?: number | [number, number]
maxRedirects?: number
method?: string
onDownloadProgress?: ((progressEvent) => void)

Type declaration

onUploadProgress?: ((progressEvent) => void)

Type declaration

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) => boolean)

Type declaration

    • (status): boolean
    • Parameters

      • status: number

      Returns boolean

withCredentials?: boolean
withXSRFToken?: boolean | ((config) => undefined | boolean)

Type declaration

xsrfCookieName?: string
xsrfHeaderName?: string

Generated using TypeDoc