diff options
author | Erik Johnston <erikj@jki.re> | 2018-04-06 12:11:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 12:11:16 +0100 |
commit | 35ff941172bafe42f3ac5410d17931de78f27051 (patch) | |
tree | 027d8c5199c03cefba9a7f1b8c1283dff1cc07da /synapse/http | |
parent | more verbosity in synctl (diff) | |
parent | use PUT instead of POST for federating groups/m.join_policy (diff) | |
download | synapse-35ff941172bafe42f3ac5410d17931de78f27051.tar.xz |
Merge pull request #3070 from krombel/group_join_put_instead_post
use PUT instead of POST for federating groups/m.join_policy
Diffstat (limited to '')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index 9145405cb0..60a29081e8 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -286,7 +286,8 @@ class MatrixFederationHttpClient(object): headers_dict[b"Authorization"] = auth_headers @defer.inlineCallbacks - def put_json(self, destination, path, data={}, json_data_callback=None, + def put_json(self, destination, path, args={}, data={}, + json_data_callback=None, long_retries=False, timeout=None, ignore_backoff=False, backoff_on_404=False): @@ -296,6 +297,7 @@ class MatrixFederationHttpClient(object): destination (str): The remote server to send the HTTP request to. path (str): The HTTP path. + args (dict): query params data (dict): A dict containing the data that will be used as the request body. This will be encoded as JSON. json_data_callback (callable): A callable returning the dict to @@ -342,6 +344,7 @@ class MatrixFederationHttpClient(object): path, body_callback=body_callback, headers_dict={"Content-Type": ["application/json"]}, + query_bytes=encode_query_args(args), long_retries=long_retries, timeout=timeout, ignore_backoff=ignore_backoff, @@ -373,6 +376,7 @@ class MatrixFederationHttpClient(object): giving up. None indicates no timeout. ignore_backoff (bool): true to ignore the historical backoff data and try the request anyway. + args (dict): query params Returns: Deferred: Succeeds when we get a 2xx HTTP response. The result will be the decoded JSON body. |