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

  • 1.0: Function introduced.

Examples

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

See also

cow_cookie(3), cow_cookie:setcookie(3)

Cowlib 2.8 Function Reference

Navigation

Version select

Like my work? Donate!

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.