1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

pass useAuthorizationHeader from constructor; add docs

This commit is contained in:
Krombel
2017-07-06 13:47:54 +02:00
parent 6e7f5feea5
commit dc66bbc3dc
3 changed files with 12 additions and 8 deletions

View File

@@ -54,6 +54,8 @@ const utils = require("./utils");
* to all requests with this client. Useful for application services which require
* <code>?user_id=</code>.
*
* @param {boolean} [opts.useAuthorizationHeader = false] Set to true to use
* Authorization header instead of query param to send the access token to the server.
*/
function MatrixBaseApis(opts) {
utils.checkObjectHasKeys(opts, ["baseUrl", "request"]);
@@ -70,6 +72,7 @@ function MatrixBaseApis(opts) {
onlyData: true,
extraParams: opts.queryParams,
localTimeoutMs: opts.localTimeoutMs,
useAuthorizationHeader: opts.useAuthorizationHeader,
};
this._http = new httpApi.MatrixHttpApi(this, httpOpts);