aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_handler_set_resp.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-12-07 11:54:57 +0100
committerLoïc Hoguin <[email protected]>2011-12-07 11:54:57 +0100
commitce92ab1e633408b0d6b2d4bb4ba61d965208ef3c (patch)
treea41bcfb2daca5cfbf35840da216a5029ba99b381 /test/http_handler_set_resp.erl
parenta12a910341dd22bd27096b50edf3d9820bc90384 (diff)
downloadcowboy-ce92ab1e633408b0d6b2d4bb4ba61d965208ef3c.tar.gz
cowboy-ce92ab1e633408b0d6b2d4bb4ba61d965208ef3c.tar.bz2
cowboy-ce92ab1e633408b0d6b2d4bb4ba61d965208ef3c.zip
Add cowboy_http_req:set_resp_cookie/4
Pretty much just an alias for a combination of set_resp_header and cookie.
Diffstat (limited to 'test/http_handler_set_resp.erl')
-rw-r--r--test/http_handler_set_resp.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/http_handler_set_resp.erl b/test/http_handler_set_resp.erl
index 6aca73d..83d48c0 100644
--- a/test/http_handler_set_resp.erl
+++ b/test/http_handler_set_resp.erl
@@ -13,7 +13,9 @@ init({_Transport, http}, Req, Opts) ->
{ok, Req3} = cowboy_http_req:set_resp_body(Body, Req2),
{ok, Req4} = cowboy_http_req:set_resp_header(
<<"X-Cowboy-Test">>, <<"ok">>, Req3),
- {ok, Req4, undefined}.
+ {ok, Req5} = cowboy_http_req:set_resp_cookie(
+ <<"cake">>, <<"lie">>, [], Req4),
+ {ok, Req5, undefined}.
handle(Req, State) ->
case cowboy_http_req:has_resp_header(<<"X-Cowboy-Test">>, Req) of