blob: 645b56813813fc327c7a1a1d8151635a566654a7 (
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
|
<tt>
<div dir="ltr">Ok, thx, I missed that one :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/12 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It sets a set-cookie header directly. You can retrieve all response headers by calling something like cowboy_req:get(resp_headers, Req).<div><br>
<br>
<div class="h5"><br><br>
<br><br>
On 05/12/2013 01:42 PM, Enrique Paz wrote:<br><br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
Hi,<br><br>
<br><br>
I have a piece of code that receives a cowboy_req:http_req() object and<br><br>
depending on some Context sets 1 or more cookies<br><br>
using cowboy_req:set_resp_cookie/4.<br><br>
<br><br>
add_cookies(Req, Context) -> ReqWithCookiesSet<br><br>
<br><br>
I want to write a unit test for it, checking that the right cookies are<br><br>
set for the right Context. How can I do that? I miss something like<br><br>
cowboy_req:get_resp_cookie/2 or so.<br><br>
<br><br>
Thx in advance for your help.<br><br>
<br><br>
--<br><br>
Enrique<br><br>
<br><br>
<br></div></div><br>
______________________________<u></u>_________________<br><br>
Extend mailing list<br><br>
<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br>
<a href="http://lists.ninenines.eu:81/listinfo/extend" target="_blank">http://lists.ninenines.eu:81/<u></u>listinfo/extend</a><br><br>
<br><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888"><br>
<br><br>
<br><br>
-- <br><br>
Loďc Hoguin<br><br>
Erlang Cowboy<br><br>
Nine Nines<br><br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>quique<br>
</div><br>
</tt>
|