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

Use the v2 (hashed) lookup for identity server queries

Fixes https://github.com/vector-im/riot-web/issues/10556
Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134) with assistance from [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140) for auth.

Note: this also changes all identity server requests to use JSON as a request body. URL encoded forms were allowed in v1 but deprecated in favour of JSON. v2 APIs do not allow URL encoded forms.
This commit is contained in:
Travis Ralston
2019-08-21 14:08:46 -06:00
parent 898fa0e41b
commit 8a0ddc43ab
2 changed files with 144 additions and 19 deletions

View File

@@ -412,7 +412,7 @@ module.exports.MatrixHttpApi.prototype = {
if (method == 'GET') {
opts.qs = params;
} else if (typeof params === "object") {
opts.form = params;
opts.json = params;
} else if (typeof params === "string") {
// Assume the caller has serialised the body to JSON
opts.body = params;