Private
abortPrivate
eventReadonly
optsThe HTTP method e.g. "GET".
The HTTP path after the supplied prefix e.g. "/createRoom".
Optional
queryParams: QueryDictA dict of query params (these will NOT be urlencoded). If unspecified, there will be no query params.
Optional
body: BodyThe HTTP JSON body.
additional options.
When paramOpts.doNotAttemptTokenRefresh
is true, token refresh will not be attempted
when an expired token is encountered. Used to only attempt token refresh once.
Promise which resolves to
{
data: {Object},
headers: {Object},
code: {Number},
}
If onlyData
is set, this will resolve to the data
object only.
Form and return a homeserver request URL based on the given path params and prefix.
The HTTP path after the supplied prefix e.g. "/createRoom".
Optional
queryParams: QueryDictA dict of query params (these will NOT be urlencoded).
Optional
prefix: stringThe full prefix to use e.g. "/_matrix/client/v2_alpha", defaulting to this.opts.prefix.
Optional
baseUrl: stringThe baseUrl to use e.g. "https://matrix.org", defaulting to this.opts.baseUrl.
URL
Perform a request to the homeserver without any credentials.
The HTTP method e.g. "GET".
The HTTP path after the supplied prefix e.g. "/createRoom".
Optional
queryParams: QueryDictA dict of query params (these will NOT be urlencoded). If unspecified, there will be no query params.
Optional
body: BodyThe HTTP JSON body.
Optional
opts: IRequestOptsadditional options
Promise which resolves to
{
data: {Object},
headers: {Object},
code: {Number},
}
If onlyData</code> is set, this will resolve to the <code>data
object only.
Perform a request to an arbitrary URL.
The HTTP method e.g. "GET".
The HTTP URL object.
Optional
body: BodyThe HTTP JSON body.
additional options
Promise which resolves to data unless onlyData
is specified as false,
where the resolved value will be a fetch Response object.
Private
sanitizePrivate
tryGenerated using TypeDoc
Perform an authorised request to the homeserver.