Setu-TS
    Preparing search index...

    Interface ClientRequest<TBody>

    An outbound JSON request described by application or generated code.

    0.1.0

    interface ClientRequest<TBody = unknown> {
        headers?: HeadersInit;
        idempotencyKey?: string;
        json?: TBody;
        method: string;
        path: string;
        query?: Record<
            string,
            | string
            | number
            | boolean
            | (string | number | boolean)[]
            | null
            | undefined,
        >;
        signal?: AbortSignal;
    }

    Type Parameters

    • TBody = unknown
    Index
    headers?: HeadersInit

    Additional headers merged on top of the client defaults.

    idempotencyKey?: string

    The caller's own idempotency key: 1–255 characters of 0x21–0x7E without ", validated before any network call. Its presence makes the request retryable on any method and on 409.

    json?: TBody

    JSON body. When present, Content-Type: application/json is set automatically.

    method: string

    HTTP method.

    path: string

    Relative path resolved against the client baseUrl. Must be relative.

    query?: Record<
        string,
        | string
        | number
        | boolean
        | (string | number | boolean)[]
        | null
        | undefined,
    >

    Query values. Primitives are encoded once; arrays repeat the key. Nullish values are omitted.

    signal?: AbortSignal

    Abort signal that cancels fetches and queued waits.