RequestOptions interface
Request options for fetch API.
Properties
| body | Raw request body. |
| headers | Per-request headers, merged over the client's default headers. |
| method | HTTP method (defaults to the method implied by the calling helper). |
| response |
Controls how the response body is read.
|
| skip |
Skip automatic token refresh and retry on 401 Unauthorized. Used for auth endpoints like signOut and refreshToken where 401 is an expected error. |
| timeout | Per-request timeout in milliseconds, overriding the client default. |
Property Details
body
Raw request body.
body?: string | null
Property Value
string | null
headers
Per-request headers, merged over the client's default headers.
headers?: Record<string, string> | Headers
Property Value
Record<string, string> | Headers
method
HTTP method (defaults to the method implied by the calling helper).
method?: string
Property Value
string
responseType
Controls how the response body is read.
'json'/'text'/ omitted — the default behaviour: the body is read as text and parsed as JSON when the responseContent-Typeindicates JSON (or when an untyped body looks like JSON).'arraybuffer'— the caller is willing to receive raw bytes. Combined with a binary responseContent-Type(for example an Apache Arrow IPC stream), the body is returned as anArrayBufferinstead of being read as text. A JSON response is still parsed as JSON, so callers can safely request'arraybuffer'for endpoints that may return either format.
responseType?: "json" | "text" | "arraybuffer"
Property Value
"json" | "text" | "arraybuffer"
skipRetryOn401
Skip automatic token refresh and retry on 401 Unauthorized. Used for auth endpoints like signOut and refreshToken where 401 is an expected error.
skipRetryOn401?: boolean
Property Value
boolean
timeout
Per-request timeout in milliseconds, overriding the client default.
timeout?: number
Property Value
number