1 # cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) #
3 cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
5 See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
14 var cookie = require('cookie');
16 var hdr = cookie.serialize('foo', 'bar');
19 var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
20 // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
25 The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
31 > absolute expiration date for the cookie (Date object)
34 > relative max age of the cookie from when the client receives it (seconds)
37 > domain for the cookie