Optional
abortOptional
baseThe alternative base url to use. If not specified, uses this.opts.baseUrl
Optional
headersmap of additional request headers
Optional
inhibitOptional
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).
Parse the response as JSON and return the parsed response.
Setting this to false
inhibits all three behaviors, and 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
prefixThe full prefix to use e.g. "/_matrix/client/v2_alpha". If not specified, uses this.opts.prefix.
Optional
rawSetting this to true
does two things:
Inhibits the automatic addition of Accept: application/json
in the request headers.
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
.