interface RequestInit
Options accepted by fetch() and the Request constructor.
Index
Properties
agent any
A keep-alive connection agent from require("http").Agent / require("https").Agent for pooled connection reuse.
body BodyInit | null
Request body.
credentials RequestCredentials
Cookie credentials mode (default "same-origin").
duplex "half"
Must be "half" when body is a ReadableStream (streamed upload).
headers HeadersInit
Request headers.
method string
HTTP method (default "GET").
redirect RequestRedirect
Redirect-following mode (default "follow", up to 20 redirects).
signal AbortSignal
An AbortSignal that aborts the request when triggered.