HttpRequestInit
Options for a single HTTP call made with httpRequest.
Properties¶
| Property | Type | Description |
|---|---|---|
body? |
unknown |
Request body. Objects and arrays are sent as JSON; strings, FormData, Blob, ArrayBuffer and URLSearchParams are sent as-is. |
headers? |
Headers |
Headers to send with the request. |
method? |
HttpMethod |
Request method. Default 'GET' |
params? |
QueryParams |
Query parameters appended to the URL. Array values are sent as repeated parameters. |
responseType? |
ResponseType |
How to read the body. By default JSON is parsed and everything else is text. |
retry? |
RetryOptions |
How to retry this call. |
signal? |
AbortSignal |
Cancels the request, including a retry that is waiting. |
timeoutMs? |
number |
How long one attempt may take, in ms. Each retry gets a fresh one. No limit by default. |