hound v1.1.1 Hound.Helpers.Cookie View Source

Cookie-related functions

Link to this section Summary

Functions

Gets cookies. Returns a list of ListDicts, each containing properties of the cookie

Delete a cookie with the given name

Delete all cookies

Sets cookie

Link to this section Functions

Gets cookies. Returns a list of ListDicts, each containing properties of the cookie.

cookies()
Link to this function

delete_cookie(name) View Source
delete_cookie(String.t()) :: :ok

Delete a cookie with the given name

Link to this function

delete_cookies() View Source
delete_cookies() :: :ok

Delete all cookies

Link to this function

set_cookie(cookie) View Source
set_cookie(map()) :: :ok

Sets cookie.

set_cookie(%{name: "cart_id", value: 123213})
set_cookie(%{name: "cart_id", value: "23fa0ev5a6er", secure: true})

Accepts a Map 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)