mochiweb_cookies

HTTP Cookie parsing and generating (RFC 2109, RFC 2965).

HTTP Cookie parsing and generating (RFC 2109, RFC 2965).

DATA TYPES

header() = {Name::string(), Value::string()}
proplist() = [{Key::string(), Value::string()}]

Functions


cookie(Key::string(), Value::string()) -> header()

Short-hand for cookie(Key, Value, []).

cookie(Key::string(), Value::string(), Options::[Option]) -> header()

  • Option = {max_age, integer()} | {local_time, {date(), time()}} | {domain, string()} | {path, string()} | {secure, true | false} | {http_only, true | false}

Generate a Set-Cookie header field tuple.

parse_cookie(Cookie::string()) -> [{K::string(), V::string()}]

Parse the contents of a Cookie header field, ignoring cookie attributes, and return a simple property list.

Emad El-Haraty emad@mochimedia.com
View Functions