0.0.0 • Published 9 years ago
cookiedog v0.0.0
cookiedog - A dog for your cookie
This is a node.js module for cookie parsing and storing, which is being applied in an awesome http project under construction.
APIs
toCookie(obj)
parseCookie(str)
parseSetCookie(arr)
CookieClient(list)
CookieClient.prototype.setCookie(domain, arr)
CookieClient.prototype.getCookieObj(domain, path)
CookieClient.prototype.getCookie(domain, path)
Usage
$ npm install cookiedog
var cookiedog = require('cookiedog')
var cookieclient = new cookielib.CookieClient()
var setcookie = res.headers['set-cookie'] || []
cookieclient.setCookie(domain, setcookie)
var pathn = req._parsedUrl.pathname
headers['cookie'] = cookieclient.getCookie(domain, pathn)
More?
Coming soon..
0.0.0
9 years ago