mochiweb

    技术2022-05-20  155

    mochiweb_cookies

    (mochiweb )

    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.

     

    转自:http://erldocs.com/R14Aextra/mochiweb/mochiweb_cookies.html#cookie/1


    最新回复(0)