Hi All
I tried to redirect a link with cookies without success.
os: Linux
python: 3.8.9
aiohttp: 3.7.4.post0
pseudo codes are here:
f = web.HTTPFound(request.app.router['index'].url_for())
f.set_cookie('abc', 'ddd')
raise f
async def index(request: web.Request):
print(request.cookies)
resp = aiohttp_jinja2.render_template('web_app/index.html', request, {})
return resp
request object on index handler didn't have the cookie 'abc'
however When I use "return f" like following
f = web.HTTPFound(request.app.router['index'].url_for())
f.set_cookie('abc', 'ddd')
return f
It just works.
I want to know what happened.
Regards
gelin yan