- Source:
Methods
getCookies(namesopt) → {Object}
Retrieve decoded cookie values by name. If no name is provided, all available cookie are being returned. Automatically decodes the values (assumes, that, if encoded, url/percent encoding has been used).
You can provide names as an array or as comma-separated parameters.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
names |
String | Array.<String> |
<optional> |
the names of the cookies, if empty or not set, all available cookies are returned |
- Source:
- See:
Returns:
dictionary of named decoded values of the cookies, will be empty if none of the cookies were available
- Type
- Object
Example
getCookies(['foobar', 'boofar'])
=> {foobar : 'value', boofar : 'value'}
getCookies('foobar', 'boofar')
=> {foobar : 'value', boofar : 'value'}
getCookie()
=> all available cookies