Response.__init__() needs encoding now

This commit is contained in:
jesopo 2019-09-17 14:11:12 +01:00
parent b7dd78ef1a
commit 8ca0d30fef

View file

@ -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 = []