cow_cookie:parse_cookie(3)

NAME

cow_cookie:parse_cookie - Parse a cookie header

DESCRIPTION
    parse_cookie(Cookie :: binary())
        -> [{binary(), binary()}]

Parse a cookie header.

ARGUMENTS

Cookie
    The cookie header value.

RETURN VALUE

A list of cookie name/value pairs is returned on success.

An exception is thrown in the event of a parse error.

CHANGELOG
    • 2.9: Fixes to the parser may lead to potential incompatibilities. A cookie name starting with $ is no longer ignored. A cookie without a = will be parsed as the value of the cookie named <<>> (empty name).
    • 1.0: Function introduced.

EXAMPLES

Parse a cookie header
    Cookies = cow_cookie:parse_cookie(CookieHd).

SEE ALSO

cow_cookie(3), cow_cookie:parse_set_cookie(3), cow_cookie:cookie(3), cow_cookie:setcookie(3)