getCookie, setCookie
Closed this issue · 2 comments
spudly commented
Add support for request.cookies
and response.cookies
keys.
spudly commented
Alternatively, maybe we should just have a route function (cookies(route) => route
) that handles this for us. This way, it's just opt-in syntactic sugar for request.headers['cookie'] and response.headers['set-cookie'].
The function would have 2 functions:
- Parsing request.headers['cookie'] into request.cookies
- Serializing response.cookies as response.headers['set-cookie']
spudly commented
Opting to create two helper functions instead: getCookie
and setCookie