diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-11-03 18:34:28 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-11-03 18:34:28 +0000 |
commit | 967b64bfbe97b9249eceedacb380cc1876d4bcc3 (patch) | |
tree | ca31899a9c6b165313ac7dd20d1f5ad7c09f6750 | |
parent | fix variable ordering thinko in post_urlencoded_get_json (diff) | |
download | synapse-967b64bfbe97b9249eceedacb380cc1876d4bcc3.tar.xz |
send json rather than urlencoded to AS API
-rw-r--r-- | synapse/rest/client/v1/profile.py | 4 | ||||
-rw-r--r-- | synapse/rest/client/v2_alpha/account.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/profile.py b/synapse/rest/client/v1/profile.py index 169938882e..e95320a353 100644 --- a/synapse/rest/client/v1/profile.py +++ b/synapse/rest/client/v1/profile.py @@ -75,7 +75,7 @@ class ProfileDisplaynameRestServlet(ClientV1RestServlet): as_token = self.hs.config.shadow_server.get("as_token") body['access_token'] = as_token - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, ("/_matrix/client/r0/profile/%s/displayname" % user_id) ), @@ -135,7 +135,7 @@ class ProfileAvatarURLRestServlet(ClientV1RestServlet): as_token = self.hs.config.shadow_server.get("as_token") body['access_token'] = as_token - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, ("/_matrix/client/r0/profile/%s/avatar_url" % user_id) ), diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index 4d0e13f2cc..d75a0558bf 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -193,7 +193,7 @@ class PasswordRestServlet(RestServlet): as_token = self.hs.config.shadow_server.get("as_token") body['access_token'] = as_token - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, "/_matrix/client/r0/account/password" ), @@ -405,7 +405,7 @@ class ThreepidRestServlet(RestServlet): as_token = self.hs.config.shadow_server.get("as_token") body['access_token'] = as_token - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, "/_matrix/client/r0/account/3pid" ), @@ -464,7 +464,7 @@ class ThreepidDeleteRestServlet(RestServlet): as_token = self.hs.config.shadow_server.get("as_token") body['access_token'] = as_token - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, "/_matrix/client/r0/account/3pid/delete" ), |