[99s-extend] Cowboy: retrieving "just set" cookies
Loïc Hoguin
essen at ninenines.eu
Sun May 12 13:44:44 CEST 2013
It sets a set-cookie header directly. You can retrieve all response
headers by calling something like cowboy_req:get(resp_headers, Req).
On 05/12/2013 01:42 PM, Enrique Paz wrote:
> Hi,
>
> I have a piece of code that receives a cowboy_req:http_req() object and
> depending on some Context sets 1 or more cookies
> using cowboy_req:set_resp_cookie/4.
>
> add_cookies(Req, Context) -> ReqWithCookiesSet
>
> I want to write a unit test for it, checking that the right cookies are
> set for the right Context. How can I do that? I miss something like
> cowboy_req:get_resp_cookie/2 or so.
>
> Thx in advance for your help.
>
> --
> Enrique
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> http://lists.ninenines.eu:81/listinfo/extend
>
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the Extend
mailing list