setcookie(Name :: iodata(), Value :: iodata(), Opts :: cow_cookie:cookie_opts()) -> iolist()
cow_cookie:setcookie - Generate a set-cookie header
setcookie(Name :: iodata(), Value :: iodata(), Opts :: cow_cookie:cookie_opts()) -> iolist()
Generate a set-cookie header.
Cookie name.
Cookie value.
Options added to the set-cookie header as attributes.
An iolist with the generated set-cookie header value.
Version
attribute is no longer generated.
SetCookie = cow_cookie:setcookie(<<"sessionid">>, ID, #{ http_only => true, secure => true }).
cow_cookie(3), cow_cookie:parse_cookie(3), cow_cookie:parse_set_cookie(3), cow_cookie:cookie(3)
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.