Hound.Helpers.Cookie
Provides cookie-related functions.
Summary
cookies() | Gets cookies. Returns a list of ListDicts, each containing properties of the cookie |
delete_cookie(name) | Delete a cookie with the given name |
delete_cookies() | Delete all cookies |
set_cookie(cookie) | Sets cookie |
Functions
Specs:
- cookies :: List.t
Gets cookies. Returns a list of ListDicts, each containing properties of the cookie.
cookies()
Specs:
- set_cookie(Dict.t) :: :ok
Sets cookie.
set_cookie([name: "cart_id", value: 123213])
set_cookie([name: "cart_id", value: "23fa0ev5a6er", secure: true])
Accepts a ListDict with the following keys:
- name (string) - REQUIRED
- value (string) - REQUIRED
- path (string)
- domain (string)
- secure (boolean)
- expiry (integer, specified in seconds since midnight, January 1, 1970 UTC)