File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,14 @@ parameter of :class:`ClientSession` constructor::
8282between multiple requests::
8383
8484 async with aiohttp.ClientSession() as session:
85- await session.get(
86- ' http://httpbin.org/cookies/set?my_cookie=my_value')
87- filtered = session.cookie_jar.filter_cookies(
88- 'http://httpbin.org')
89- assert filtered[' my_cookie' ].value == ' my_value'
90- async with session.get(' http://httpbin.org/cookies' ) as r:
85+ async with session.get(
86+ " http://httpbin.org/cookies/set?my_cookie=my_value",
87+ allow_redirects=False
88+ ) as resp:
89+ assert resp.cookies[" my_cookie" ].value == " my_value"
90+ async with session.get(" http://httpbin.org/cookies" ) as r:
9191 json_body = await r.json()
92- assert json_body[' cookies'][' my_cookie' ] == ' my_value'
92+ assert json_body[" cookies"][" my_cookie" ] == " my_value"
9393
9494Response Headers and Cookies
9595----------------------------
You can’t perform that action at this time.
0 commit comments