View Source hackney_cookie (hackney v1.23.0)

Summary

Functions

Parse a cookie header string and return a list of key/values.
Convert a cookie name, value and options to its iodata form.

Types

cookie_option/0

-type cookie_option() ::
          {max_age, non_neg_integer()} |
          {domain, binary()} |
          {path, binary()} |
          {secure, boolean()} |
          {http_only, boolean()}.

cookie_opts/0

-type cookie_opts() :: [cookie_option()].

Functions

parse_cookie(Cookie)

-spec parse_cookie(binary()) -> [{binary(), binary()}] | {error, badarg}.
Parse a cookie header string and return a list of key/values.

setcookie(Name, Value, Opts)

-spec setcookie(iodata(), iodata(), cookie_opts()) -> binary().
Convert a cookie name, value and options to its iodata form.