Framework

- About
- Guides
- Community
- API
- Code
- Download

# Kanso API Documentation

Index | View on single page

## cookies

Functions related to the manipulation and reading of cookies.

### readBrowserCookies()

Read cookies currently stored in the browser, returning an object keyed by cookie name.

Returns: Object

### readBrowserCookie(name)

Reads browser cookies and returned the value of the named cookie.

Returns: String

### cookieString(req, opt)

Creates a string for storing a cookie on the browser.

#### Parameters

req | Request Object |
opt | Object |

Returns: String

### setBrowserCookie(req, opt)

Sets a cookie on the browser, for use client-side only.

#### Parameters

req | Request Object |
opt | Object |

### setResponseCookie(req, res, opt)

Creates a Set-Cookie header on a response object.

#### Parameters

req | Request Object |
res | Response Object |
opt | Object |