CML
    Preparing search index...

    Type Alias HttpRequest<D>

    Generic request API.

    type HttpRequest<D = any> = {
        body?: BodyInit;
        credentials?: RequestCredentials;
        customData?: D;
        headers?: Record<string, string>;
        method?: string;
        mode?: RequestMode;
        responseType?: RequestResponseType;
        timeout?: number;
        url: string;
    }

    Type Parameters

    • D = any
    Index

    Properties

    body?: BodyInit

    The body of the request.

    credentials?: RequestCredentials

    Whether the user agent should send or receive cookies from the other domain in cross-origin requests.

    customData?: D

    Any custom data.

    headers?: Record<string, string>

    The headers object associated with the request.

    method?: string

    The request's method (GET, POST, etc).

    The mode of the request, for example cors, no-cors, or same-origin.

    responseType?: RequestResponseType

    The type that the response from the server must be compatible with.

    timeout?: number

    The number of milliseconds the request may take before it is terminated. If the value is undefined or 0, there is no timeout.

    url: string

    The URL of the request.