Interface FetchRequestOptions
Hierarchy
- RequestOptions
- FetchRequestOptions
Properties
Optional body
body?: string | object
Request body.
When an object is provided for body, it will be serialized into JSON string by default. When application/x-www-form-urlencoded header is provided, the object will be serialized as query params.
Optional headers
headers?: Record<string, unknown>
Request headers. An object with key-value pair.
For a undefined value, the corresponding header will not be added to the request.
For a non-string value, it will be serialized before being added as a header.
Optional method
method?: "GET" | "POST"
HTTP method, GET or POST. Default value is GET.
Optional query
query?: Record<string, unknown>
Query params. An object with key-value pair.
The object will be serialized as query string and appended to the url.
Generated using TypeDoc
Request options for fetchJson and fetchArrayBuffer