diff options
author | David Baker <dave@matrix.org> | 2017-04-26 11:31:55 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2017-04-26 11:31:55 +0100 |
commit | 81804909d3a7c20330b2992cf1fed0672dd8f531 (patch) | |
tree | a6849618c8e3d2e6eb8f7136c8055c5c4b3e10fb /contrib | |
parent | Fix get_json (diff) | |
parent | document how to make IPv6 work (#2088) (diff) | |
download | synapse-81804909d3a7c20330b2992cf1fed0672dd8f531.tar.xz |
Merge remote-tracking branch 'origin/develop' into dbkr/http_request_propagate_error
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cmdclient/http.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/cmdclient/http.py b/contrib/cmdclient/http.py index 4186897316..c833f3f318 100644 --- a/contrib/cmdclient/http.py +++ b/contrib/cmdclient/http.py @@ -36,15 +36,13 @@ class HttpClient(object): the request body. This will be encoded as JSON. Returns: - Deferred: Succeeds when we get *any* HTTP response. - - The result of the deferred is a tuple of `(code, response)`, - where `response` is a dict representing the decoded JSON body. + Deferred: Succeeds when we get a 2xx HTTP response. The result + will be the decoded JSON body. """ pass def get_json(self, url, args=None): - """ Get's some json from the given host homeserver and path + """ Gets some json from the given host homeserver and path Args: url (str): The URL to GET data from. @@ -54,10 +52,8 @@ class HttpClient(object): and *not* a string. Returns: - Deferred: Succeeds when we get *any* HTTP response. - - The result of the deferred is a tuple of `(code, response)`, - where `response` is a dict representing the decoded JSON body. + Deferred: Succeeds when we get a 2xx HTTP response. The result + will be the decoded JSON body. """ pass @@ -214,4 +210,4 @@ class _JsonProducer(object): pass def stopProducing(self): - pass \ No newline at end of file + pass |