RequestOptions: {
    __binaryResponse?: boolean;
    __streamClass?: typeof Stream;
    body?: unknown;
    defaultBaseURL?: string;
    fetchOptions?: MergedRequestInit;
    headers?: HeadersLike;
    idempotencyKey?: string;
    maxRetries?: number;
    method?: HTTPMethod;
    path?: string;
    query?: object | null;
    signal?: AbortSignal | null;
    stream?: boolean;
    timeout?: number;
}

Type declaration

  • Optional__binaryResponse?: boolean
  • Optional__streamClass?: typeof Stream
  • Optionalbody?: unknown

    The request body. Can be a string, JSON object, FormData, or other supported types.

  • OptionaldefaultBaseURL?: string

    Override the default base URL for this specific request.

  • OptionalfetchOptions?: MergedRequestInit

    Additional RequestInit options to be passed to the underlying fetch call. These options will be merged with the client's default fetch options.

  • Optionalheaders?: HeadersLike

    HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples.

  • OptionalidempotencyKey?: string

    A unique key for this request to enable idempotency.

  • OptionalmaxRetries?: number

    The maximum number of times that the client will retry a request in case of a temporary failure, like a network error or a 5XX error from the server.

    2
    
  • Optionalmethod?: HTTPMethod

    The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete').

  • Optionalpath?: string

    The URL path for the request.

    "/v1/foo"
    
  • Optionalquery?: object | null

    Query parameters to include in the request URL.

  • Optionalsignal?: AbortSignal | null

    An AbortSignal that can be used to cancel the request.

  • Optionalstream?: boolean
  • Optionaltimeout?: number

    The maximum amount of time (in milliseconds) that the client should wait for a response from the server before timing out a single request.

    milliseconds