Support for cookies?
Closed this issue · 3 comments
chadfurman commented
Is there support for cookies? The documentation doesn't mention this
diachedelic commented
I think so, insomuch as Cookies are just headers. The following example from the Node docs should work, let me know if it's doesn't:
response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
const setCookie = response.getHeader('set-cookie');
// setCookie is of type string[]
diachedelic commented
See also this module for parsing/serialising cookies: https://www.npmjs.com/package/cookie
diachedelic commented
I've lightly documented it here: ab14b00