diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-24 18:52:34 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-24 18:52:34 +0000 |
commit | efb8ed1d453fc9f76f9e9225532281963b7ea53c (patch) | |
tree | 62626873812dfce5f24b556b406b47a47159b214 /synapse/http/client.py | |
parent | Replace missed usages of FrozenEvent (diff) | |
parent | Merge pull request #4448 from matrix-org/erikj/get_pdu_versions (diff) | |
download | synapse-efb8ed1d453fc9f76f9e9225532281963b7ea53c.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/require_format_version
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index afcf698b29..47a1f82ff0 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -333,9 +333,10 @@ class SimpleHttpClient(object): "POST", uri, headers=Headers(actual_headers), data=query_bytes ) + body = yield make_deferred_yieldable(readBody(response)) + if 200 <= response.code < 300: - body = yield make_deferred_yieldable(treq.json_content(response)) - defer.returnValue(body) + defer.returnValue(json.loads(body)) else: raise HttpResponseException(response.code, response.phrase, body) |