From c8083b90060cad3afbe5d26241dbffc1b12f8261 Mon Sep 17 00:00:00 2001 From: Romuald Juchnowicz-Bierbasz Date: Fri, 10 May 2019 17:05:40 +0200 Subject: [PATCH] Add cookie_jar param to HttpClient --- src/galaxy/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/galaxy/http.py b/src/galaxy/http.py index 92dc293..eaa1454 100644 --- a/src/galaxy/http.py +++ b/src/galaxy/http.py @@ -11,11 +11,11 @@ from galaxy.api.errors import ( ) class HttpClient: - def __init__(self, limit=20, timeout=aiohttp.ClientTimeout(total=60)): + def __init__(self, limit=20, timeout=aiohttp.ClientTimeout(total=60), cookie_jar=None): ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ssl_context.load_verify_locations(certifi.where()) connector = aiohttp.TCPConnector(limit=limit, timeout=timeout, ssl=ssl_context) - self._session = aiohttp.ClientSession(connector=connector) + self._session = aiohttp.ClientSession(connector=connector, cookie_jar=cookie_jar) async def close(self): await self._session.close()