Cookies¶
Accessing the request cookies:
from nanohttp import context
counter = context.cookies.get('counter')
Setting cookie:
from nanohttp import context
context.cookies['dummy-cookie1'] = 'dummy-value'
context.cookies['dummy-cookie1']['http_only'] = True
For more information on how to use cookies, please check the python builtin’s http.cookies.