Method expire
Expires a cookie if it exists
Parameters:
res must be an Object.
(HTTP(S) response Object)
name must be a String.
(Name of the cookie to expire)
domain must be a String.
([Optional] Domain to set the cookie for)
secure must be a Boolean.
([Optional] Make the cookie only accessible via SSL)
path must be a String.
([Optional] Path the cookie is for)
Returns a String
(Name of the expired cookie)
Method get
Gets a cookie from the request headers
Parameters:
req must be an Object.
(HTTP(S) request Object)
name must be a String.
(Name of the cookie to get)
Returns a Mixed
(Cookie or undefined)
Method list
Gets a list cookies from the request headers
Parameters:
req must be an Object.
(HTTP(S) request Object)
name must be a String.
(Cookie name)
Returns an Object
(Collection of cookies)
Method set
Sets a cookie in the response headers
Parameters:
res must be an Object.
(HTTP(S) response Object)
name must be a String.
(Name of the cookie to create)
value must be a String.
(Value to set)
offset must be a String.
(A positive or negative integer followed by "d", "h", "m" or "s")
domain must be a String.
([Optional] Domain to set the cookie for)
secure must be a Boolean.
([Optional] Make the cookie only accessible via SSL)
path must be a String.
([Optional] Path the cookie is for)
Returns an Undefined
(undefined)
Cookies