setCookie

Sets a cookie for current page.

Usage

1
client.setCookie(cookie).then(callback);

Parameters

Param Type Details
cookie Object cookie object

Example

getCookie.js
1
2
3
4
5
client
.setCookie({name: 'test', value: '123'})
.getCookie().then(function(cookies) {
console.log(cookies); // outputs: [{ name: 'test', value: '123' }]
})

Uses