how does the cookie jar work with this?
sathia-musso opened this issue · 1 comments
sathia-musso commented
I see that you can set a cookie_jar when constructing the class but then when I need to inspect the cookie_jar it says
AttributeError: 'RetryClient' object has no attribute 'cookie_jar'
any idea?
inyutin commented
@sathio,
What version of aiohttp and aiohttp-retry do you use?
Code like this should work fine:
def test():
jar = aiohttp.CookieJar(unsafe=True)
client = RetryClient(cookie_jar=jar)
async with client.get("https://ya.ru") as response:
print(response.status)
text = await response.text()
print(text)
await client.close()