Vereda
    Preparing search index...

    Interface RequestOptions<T>

    interface RequestOptions<T = unknown> {
        method?: string;
        headers?: HeadersInit;
        body?: BodyInit | (() => BodyInit);
        partition?: string;
        parse?: ParseFn<T>;
        responseType?: ResponseType;
        retry?: RetryConfig;
        timeout?: TimeoutConfig;
        signal?: AbortSignal;
    }

    Type Parameters

    • T = unknown
    Index
    method?: string
    "GET"
    
    headers?: HeadersInit
    body?: BodyInit | (() => BodyInit)

    Request body, or a factory that returns a fresh body on every attempt (replayable body). A ReadableStream must be supplied via a factory. The factory must return a fresh body each invocation — reusing the same ReadableStream replays an already-consumed (empty) stream.

    partition?: string

    Named bulkhead partition. Defaults to host (hostname + port when non-default).

    parse?: ParseFn<T>

    Schema parse function. Use withZod() or custom.

    responseType?: ResponseType

    How the body is read; parse receives the result. Defaults to "json" when parse is set; with neither, the body is left unread on raw. The read and parse both run inside the attempt's timeout.

    retry?: RetryConfig
    timeout?: TimeoutConfig
    signal?: AbortSignal

    Signal to cancel the request externally