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

cookies()

Specs:

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


cookies()


delete_cookie(name)

Specs:

Delete a cookie with the given name

delete_cookies()

Specs:

  • delete_cookies :: :ok

Delete all cookies

set_cookie(cookie)

Specs:

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)