1.0.1 • Published 7 years ago
freon-cookies v1.0.1
freon-cookies
Freon plugin to parse and serialize cookies
Installation:
npm install freon-cookies
Usage:
// ... 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