send json rather than urlencoded to AS API
This commit is contained in:
@@ -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)
|
||||
),
|
||||
|
||||
@@ -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"
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user