Optional
abortOptional
headersmap of additional request headers
Optional
jsonBy default, we will:
If the body
is an object, JSON-encode it and set Content-Type: application/json
in the
request headers (unless overridden by headers).
Set Accept: application/json
in the request headers (again, unless overridden by headers).
If IHTTPOpts.onlyData
is set to true
on the FetchHttpApi
instance, parse the response as
JSON and return the parsed response.
Setting this to false
inhibits all three behaviors, and (if IHTTPOpts.onlyData
is set to true
) the response
is instead parsed as a UTF-8 string. It defaults to true
, unless rawResponseBody is set.
Instead of setting this to false
, set rawResponseBody to true
.
Optional
keepOptional
localThe maximum amount of time to wait before timing out the request. If not specified, there is no timeout.
Optional
rawSetting this to true
does two things:
Inhibits the automatic addition of Accept: application/json
in the request headers.
Assuming IHTTPOpts.onlyData
is set to true
on the FetchHttpApi
instance, causes the
raw response to be returned as a https://developer.mozilla.org/en-US/docs/Web/API/Blob|Blob
instead of parsing it as json
.
Options object for
FetchHttpApi.requestOtherUrl
.