OptionalbodyOptionalbodyFactory function to generate a fresh body for streaming retries.
OptionalcacheOptionalcookiesKey-value map of cookies to set in the Cookie header.
OptionalcredentialsOptionaldispatcherOptionalduplexNode.js fetch duplex option. Auto-detected as 'half' for streams.
OptionalformShortcut to send application/x-www-form-urlencoded body.
OptionalheadersOptionalhooksRequest lifecycle hooks.
OptionalintegrityOptionaljsonShortcut to send JSON body. Automatically stringifies and sets
Content-Type: application/json and Accept: application/json if unset.
OptionalkeepaliveOptionalmethodOptionalmodeOptionalpasswordPassword for HTTP Basic Authentication.
OptionalprefixBase URL to prepend to relative URL paths.
OptionalredirectOptionalreferrerOptionalreferrerOptionalretryRetry configuration or integer count of retries.
OptionalsearchQuery parameters to append to the URL.
OptionalsignalOptionalthrowAutomatically throw HttpError when !res.ok.
Default: false (except in .json(), .text(), .buffer(), etc. where default is true)
OptionaltimeoutTotal timeout in milliseconds, covering both the response headers and the
body read (including stream() pipelines). Merged with any caller-supplied
signal. Applied per attempt, so N retries can take up to N x timeout.
Exceeding it aborts the request with a TimeoutError; if the deadline
lands mid-body, the pending body read rejects with that same error.
OptionalusernameUsername for HTTP Basic Authentication.
Optionalwindow
Request body. Supports standard RequestInit body, Node.js Readable streams, or null.