Optional
addonsOptional
basebase url to be prepended to the url
this base url is always treated as a "base path", i.e. the path passed to ffetch()
will always be appended to it (unlike the new URL()
, which has ambiguous slash semantics)
Optional
bodybody to be passed to fetch()
Optional
capturewhether to capture stack trace for errors may slightly impact performance
Optional
extraany additional options to be passed to fetch()
Optional
fetchimplementation of fetch()
Optional
init: RequestInitOptional
init: RequestInitOptional
init: RequestInitOptional
headersheaders to be passed to fetch()
Optional
jsonshorthand for sending json body.
mutually exclusive with body
Optional
methodhttp method
Optional
middlewaresmiddlewares for the requests
Optional
readwhether to read the body of the response on HttpError (i.e. when validateResponse
returns false).
useful for debugging, but may be undesirable in some cases.
Optional
validatewhether to throw HttpError on non-2xx responses
when a function is provided, it will be called with the response and should return whether the response is valid. if it returns false, the response will be thrown as an HttpError
addons for the request