File tree 1 file changed +7
-7
lines changed
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::
82
82
between multiple requests::
83
83
84
84
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:
91
91
json_body = await r.json()
92
- assert json_body[' cookies'][' my_cookie' ] == ' my_value'
92
+ assert json_body[" cookies"][" my_cookie" ] == " my_value"
93
93
94
94
Response Headers and Cookies
95
95
----------------------------
You can’t perform that action at this time.
0 commit comments