Skip to content

RequestOptions

Defined in: src/core/types.ts:371

T = unknown

optional method?: string

Defined in: src/core/types.ts:373

"GET"

optional headers?: HeadersInit

Defined in: src/core/types.ts:374


optional body?: BodyInit | (() => BodyInit)

Defined in: src/core/types.ts:379

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.


optional partition?: string

Defined in: src/core/types.ts:381

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


optional parse?: ParseFn<T>

Defined in: src/core/types.ts:383

Schema parse function. Use withZod() or custom.


optional responseType?: ResponseType

Defined in: src/core/types.ts:387

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.


optional retry?: RetryConfig

Defined in: src/core/types.ts:388


optional timeout?: TimeoutConfig

Defined in: src/core/types.ts:389


optional signal?: AbortSignal

Defined in: src/core/types.ts:391

Signal to cancel the request externally