1.0.2 • Published 11 months ago
freon-cookies v1.0.2
freon-cookies
Freon plugin to parse and serialize cookies
Installation:
npm install freon-cookiesUsage:
// ... create a Freon application ...
app.plugin(require('freon-cookies'));Properties added to the request object
cookies: { String : String }- the cookies sent by the client, parsed
Properties added to the response object
cookies: { String : String }- the cookies that are to be sent to the clientaddCookie: Function- adds a cookie to be sent -name: String- the name of the cookie to be sent -value: String- the value of the cookie to be sent -options: Object- cookie options. For more information, see thisremoveCookie: Function- prevents a cookie from being sent to the client -name: String- the name of the cookie to removeremoveCookies: Function- prevents cookies from being sent to the client -names: ...String- the names of the cookies to removedeleteCookie: Function- deletes a cookie from the client -name: String- the name of the cookie to deletedeleteCookies: Function- deletes cookies from the client -names: ...String- the names of the cookies to delete