Documentation
    Preparing search index...

    Type Alias Request<D>Beta

    Generic request API.

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

    Type Parameters

    • D = any
    Index

    Properties

    body?: BodyInit

    The body of the request.

    credentials?: RequestCredentials

    Indicates whether the user agent should send or receive cookies from the other domain in the case of 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).

    mode?: RequestMode

    The mode of the request (e.g., cors, no-cors, same-origin, etc).

    responseType?: RequestType

    The response type with which the response from the server shall be compatible.

    timeout?: number

    The number of milliseconds the request can take before automatically being terminated. If undefined or value is 0 then there is no timeout.

    url: string

    The URL of the request.