aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cow_cookie.cookie.asciidoc
blob: c40d66b82040540e42cf33352e814c7ac38e2482 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
= cow_cookie:cookie(3)

== Name

cow_cookie:cookie - Generate a cookie header

== Description

[source,erlang]
----
cookie(Cookies) -> iolist()

Cookies :: [{Name :: iodata(), Value :: iodata()}]
----

Generate a cookie header.

== Arguments

Cookies::

A list of pairs of cookie name and value.

== Return value

An iolist with the generated cookie header value.

== Changelog

* *2.9*: Function introduced.

== Examples

.Generate a cookie header
[source,erlang]
----
Cookie = cow_cookie:cookie([{<<"sessionid">>, ID}]).
----

== See also

link:man:cow_cookie(3)[cow_cookie(3)],
link:man:cow_cookie:parse_cookie(3)[cow_cookie:parse_cookie(3)],
link:man:cow_cookie:parse_set_cookie(3)[cow_cookie:parse_set_cookie(3)],
link:man:cow_cookie:setcookie(3)[cow_cookie:setcookie(3)]