parse_cookie(Cookie :: binary())
-> parse_cookie(Cookie, #{})
parse_cookie(Cookie :: binary(), Opts)
-> [{binary(), binary()}]
Opts :: #{max_cookies => non_neg_integer()}
cow_cookie:parse_cookie - Parse a cookie header
parse_cookie(Cookie :: binary())
-> parse_cookie(Cookie, #{})
parse_cookie(Cookie :: binary(), Opts)
-> [{binary(), binary()}]
Opts :: #{max_cookies => non_neg_integer()}
Parse a cookie header.
The cookie header value.
A list of cookie name/value pairs is returned on success.
An exception is thrown in the event of a parse error.
parse_cookie/2 introduced with a max_cookies option.
$ is no longer ignored. A cookie without a = will be parsed as the value of the cookie named <<>> (empty name).
Cookies = cow_cookie:parse_cookie(CookieHd).
cow_cookie(3), cow_cookie:parse_set_cookie(3), cow_cookie:cookie(3), cow_cookie:setcookie(3)
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.