cookie

Protocol binding to operate with cookies on the current page.

Usage

1
client.cookie([method][,args]).then(callback);

Parameters

Param Type Details
method
optional
String request method
args
optional
Object/String= contains cookie information if you want to set a cookie or contains name of cookie if you want to delete it

Example

cookie.js
1
2
3
4
5
6
7
8
9
10
11
// get all cookies
client.cookie(function(err,res) { ... });

// set cookie
client.cookie('post', {
name: 'myCookie',
value: 'some content'
});

// delete cookie
client.cookie('delete','myCookie');