-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathPlug.Conn.Cookies.html
118 lines (76 loc) · 3.37 KB
/
Plug.Conn.Cookies.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<title>Plug.Conn.Cookies</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="content">
<div class="breadcrumbs">plug v0.5.1 → <a href="overview.html">Overview</a> → <a href="Plug.html">Plug</a> → <a href="Plug.Conn.html">Conn</a> → <a href="Plug.Conn.Cookies.html">Cookies</a></div>
<h1>
Plug.Conn.Cookies
</h1>
<ul class="summary_links">
<li><a href="#summary">Summary</a></li>
<li><a href="#functions_details">Functions</a></li>
</ul>
<div id="moduledoc" class="docstring">
<p>Conveniences for encoding and decoding cookies</p>
</div>
<h2 id="summary">Summary<div class="detail_header_links"><a class="to_top_link" href="#content" title="To the top of the page">↑</a></div></h2>
<table class="summary">
<tr>
<td class="summary_signature"><a href="#decode/1">decode(cookie)</a></td>
<td class="summary_synopsis"><p>Decodes the given cookies as given in a request header</p>
</td>
</tr>
<tr>
<td class="summary_signature"><a href="#encode/2">encode(key, opts \\ %{})</a></td>
<td class="summary_synopsis"><p>Encodes the given cookies as expected in a response header</p>
</td>
</tr>
</table>
<div id="functions_details" class="details_list">
<h2>Functions</h2>
<div class="detail">
<div class="detail_header" id="decode/1">
<span class="signature"><strong>decode(cookie)</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#decode/1" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<div class="docstring"><p>Decodes the given cookies as given in a request header.</p>
<p>If a cookie is invalid, it is automatically discarded from the result.</p>
<h2 id="examples">Examples</h2>
<pre><code>iex> decode("key1=value1, key2=value2")
%{"key1" => "value1", "key2" => "value2"}</code></pre>
</div>
</div>
<div class="detail">
<div class="detail_header" id="encode/2">
<span class="signature"><strong>encode(key, opts \\ %{})</strong></span>
<div class="detail_header_links">
<span class="detail_type">(function)</span>
<a href="#encode/2" class="detail_link" title="Link to this function">#</a>
<a class="to_top_link" href="#content" title="To the top of the page">↑</a>
</div>
</div>
<div class="docstring"><p>Encodes the given cookies as expected in a response header.</p>
</div>
</div>
</div>
</div>
</body>
</html>