Skip to content
Snippets Groups Projects
Commit 5a78d0ec authored by inso's avatar inso
Browse files

Aihttop 2

parent f0f4313a
No related branches found
No related tags found
No related merge requests found
......@@ -159,10 +159,10 @@ class API(object):
:rtype: aiohttp.ClientResponse
"""
logging.debug("Request : {0}".format(self.reverse_url(self.connection_handler.http_scheme, path)))
with aiohttp.Timeout(15):
url = self.reverse_url(self.connection_handler.http_scheme, path)
response = await self.connection_handler.session.get(url, params=kwargs, headers=self.headers,
proxy=self.connection_handler.proxy)
proxy=self.connection_handler.proxy,
timeout=15)
if response.status != 200:
try:
error_data = parse_error(await response.text())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment