aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_handler_set_resp.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/http_handler_set_resp.erl')
-rw-r--r--test/http_handler_set_resp.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/http_handler_set_resp.erl b/test/http_handler_set_resp.erl
index db22168..806bca8 100644
--- a/test/http_handler_set_resp.erl
+++ b/test/http_handler_set_resp.erl
@@ -7,14 +7,12 @@
init({_Transport, http}, Req, Opts) ->
Headers = proplists:get_value(headers, Opts, []),
Body = proplists:get_value(body, Opts, <<"http_handler_set_resp">>),
- {ok, Req2} = lists:foldl(fun({Name, Value}, {ok, R}) ->
+ Req2 = lists:foldl(fun({Name, Value}, R) ->
cowboy_req:set_resp_header(Name, Value, R)
- end, {ok, Req}, Headers),
- {ok, Req3} = cowboy_req:set_resp_body(Body, Req2),
- {ok, Req4} = cowboy_req:set_resp_header(
- <<"X-Cowboy-Test">>, <<"ok">>, Req3),
- {ok, Req5} = cowboy_req:set_resp_cookie(
- <<"cake">>, <<"lie">>, [], Req4),
+ end, Req, Headers),
+ Req3 = cowboy_req:set_resp_body(Body, Req2),
+ Req4 = cowboy_req:set_resp_header(<<"X-Cowboy-Test">>, <<"ok">>, Req3),
+ Req5 = cowboy_req:set_resp_cookie(<<"cake">>, <<"lie">>, [], Req4),
{ok, Req5, undefined}.
handle(Req, State) ->