Skip to content

we-lib/cookiedog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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..

About

A cookie store as a client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published