cow_cookie.parse_cookie.asciidoc 905 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. = cow_cookie:parse_cookie(3)
  2. == Name
  3. cow_cookie:parse_cookie - Parse a cookie header
  4. == Description
  5. [source,erlang]
  6. ----
  7. parse_cookie(Cookie :: binary())
  8. -> [{binary(), binary()}]
  9. ----
  10. Parse a cookie header.
  11. == Arguments
  12. Cookie::
  13. The cookie header value.
  14. == Return value
  15. A list of cookie name/value pairs is returned on success.
  16. An exception is thrown in the event of a parse error.
  17. == Changelog
  18. * *2.9*: Fixes to the parser may lead to potential incompatibilities.
  19. A cookie name starting with `$` is no longer ignored.
  20. A cookie without a `=` will be parsed as the value of
  21. the cookie named `<<>>` (empty name).
  22. * *1.0*: Function introduced.
  23. == Examples
  24. .Parse a cookie header
  25. [source,erlang]
  26. ----
  27. Cookies = cow_cookie:parse_cookie(CookieHd).
  28. ----
  29. == See also
  30. link:man:cow_cookie(3)[cow_cookie(3)],
  31. link:man:cow_cookie:setcookie(3)[cow_cookie:setcookie(3)]