Trilium Backend API
    Preparing search index...

    Interface CreateAxiosDefaults<D>

    Construct a type with the properties of T except for those in type K.

    interface CreateAxiosDefaults<D = any> {
        adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
        allowAbsoluteUrls?: boolean;
        auth?: AxiosBasicCredentials;
        baseURL?: string;
        beforeRedirect?: (
            options: Record<string, any>,
            responseDetails: {
                headers: Record<string, string>;
                statusCode: HttpStatusCode;
            },
        ) => void;
        cancelToken?: CancelToken;
        data?: D;
        decompress?: boolean;
        env?: {
            fetch?: (
                input: string | URL | Request,
                init?: RequestInit,
            ) => Promise<Response>;
            FormData?: new (...args: any[]) => object;
            Request?: new (
                input: string | URL | Request,
                init?: RequestInit,
            ) => Request;
            Response?: new (
                body?:
                    | string
                    | ArrayBuffer
                    | Blob
                    | FormData
                    | URLSearchParams
                    | ArrayBufferView<ArrayBufferLike>,
                init?: ResponseInit,
            ) => Response;
        };
        family?: AddressFamily;
        fetchOptions?: | Record<string, any>
        | Omit<RequestInit, "headers" | "method" | "signal" | "body">;
        formSerializer?: FormSerializerOptions;
        headers?:
            | AxiosHeaders
            | Partial<
                RawAxiosHeaders & {
                    Accept: AxiosHeaderValue;
                    Authorization: AxiosHeaderValue;
                    "Content-Encoding": AxiosHeaderValue;
                    "Content-Length": AxiosHeaderValue;
                    "User-Agent": AxiosHeaderValue;
                } & { "Content-Type": ContentType },
            >
            | Partial<HeadersDefaults>;
        http2Options?: Record<string, any> & { sessionTimeout?: number };
        httpAgent?: any;
        httpsAgent?: any;
        httpVersion?: 1 | 2;
        insecureHTTPParser?: boolean;
        lookup?:
            | (
                (
                    hostname: string,
                    options: object,
                    cb: (
                        err: 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;
        parseReviver?: (this: any, key: string, value: any) => any;
        proxy?: false | AxiosProxyConfig;
        responseEncoding?: string;
        responseType?: ResponseType;
        signal?: GenericAbortSignal;
        socketPath?: string;
        timeout?: number;
        timeoutErrorMessage?: string;
        transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
        transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
        transitional?: TransitionalOptions;
        transport?: any;
        url?: string;
        validateStatus?: (status: number) => boolean;
        withCredentials?: boolean;
        withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean);
        xsrfCookieName?: string;
        xsrfHeaderName?: string;
    }

    Type Parameters

    • D = any

    Hierarchy (View Summary)

    Index

    Properties

    allowAbsoluteUrls?: boolean
    baseURL?: string
    beforeRedirect?: (
        options: Record<string, any>,
        responseDetails: {
            headers: Record<string, string>;
            statusCode: HttpStatusCode;
        },
    ) => void
    cancelToken?: CancelToken
    data?: D
    decompress?: boolean
    env?: {
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
        FormData?: new (...args: any[]) => object;
        Request?: new (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Request;
        Response?: new (
            body?:
                | string
                | ArrayBuffer
                | Blob
                | FormData
                | URLSearchParams
                | ArrayBufferView<ArrayBufferLike>,
            init?: ResponseInit,
        ) => Response;
    }
    family?: AddressFamily
    fetchOptions?:
        | Record<string, any>
        | Omit<RequestInit, "headers" | "method" | "signal" | "body">
    formSerializer?: FormSerializerOptions
    headers?:
        | AxiosHeaders
        | Partial<
            RawAxiosHeaders & {
                Accept: AxiosHeaderValue;
                Authorization: AxiosHeaderValue;
                "Content-Encoding": AxiosHeaderValue;
                "Content-Length": AxiosHeaderValue;
                "User-Agent": AxiosHeaderValue;
            } & { "Content-Type": ContentType },
        >
        | Partial<HeadersDefaults>
    http2Options?: Record<string, any> & { sessionTimeout?: number }
    httpAgent?: any
    httpsAgent?: any
    httpVersion?: 1 | 2
    insecureHTTPParser?: boolean
    lookup?:
        | (
            (
                hostname: string,
                options: object,
                cb: (
                    err: 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
    parseReviver?: (this: any, key: string, value: any) => any
    proxy?: false | AxiosProxyConfig
    responseEncoding?: string
    responseType?: ResponseType
    socketPath?: string
    timeout?: number
    timeoutErrorMessage?: string
    transitional?: TransitionalOptions
    transport?: any
    url?: string
    validateStatus?: (status: number) => boolean
    withCredentials?: boolean
    withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean)
    xsrfCookieName?: string
    xsrfHeaderName?: string