RequestOptions
Defined in: src/core/types.ts:371
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”method?
Section titled “method?”
optionalmethod?:string
Defined in: src/core/types.ts:373
Default
Section titled “Default”"GET"headers?
Section titled “headers?”
optionalheaders?:HeadersInit
Defined in: src/core/types.ts:374
optionalbody?: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.
partition?
Section titled “partition?”
optionalpartition?:string
Defined in: src/core/types.ts:381
Named bulkhead partition. Defaults to host (hostname + port when non-default).
parse?
Section titled “parse?”
optionalparse?:ParseFn<T>
Defined in: src/core/types.ts:383
Schema parse function. Use withZod() or custom.
responseType?
Section titled “responseType?”
optionalresponseType?: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.
retry?
Section titled “retry?”
optionalretry?:RetryConfig
Defined in: src/core/types.ts:388
timeout?
Section titled “timeout?”
optionaltimeout?:TimeoutConfig
Defined in: src/core/types.ts:389
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: src/core/types.ts:391
Signal to cancel the request externally
