aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-17 14:11:12 +0100
committerGravatar jesopo2019-09-17 14:11:12 +0100
commit8ca0d30fef6b4845e29f1644d0aa44ebcbdc7d84 (patch)
treeb200272507132fa32b7eaafa3679ce2e2ae25612
parentrestore 5 second (instead of default 10) deadline for http.request (diff)
signature
Response.__init__() needs `encoding` now
-rw-r--r--src/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index e86a0683..7f24f4ab 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -227,7 +227,7 @@ def request_many(urls: typing.List[str]) -> typing.Dict[str, Response]:
headers = utils.CaseInsensitiveDict(dict(response.headers))
data = response.body.decode("utf8")
- responses[url] = Response(response.code, data, headers)
+ responses[url] = Response(response.code, data, headers, "utf8")
loop = asyncio.new_event_loop()
awaits = []