aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE_data/http_handler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/http_SUITE_data/http_handler.erl')
-rw-r--r--test/http_SUITE_data/http_handler.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/http_SUITE_data/http_handler.erl b/test/http_SUITE_data/http_handler.erl
index 61c14f8..62e9193 100644
--- a/test/http_SUITE_data/http_handler.erl
+++ b/test/http_SUITE_data/http_handler.erl
@@ -3,12 +3,8 @@
-module(http_handler).
-export([init/2]).
--export([handle/2]).
init(Req, Opts) ->
- {http, Req, Opts}.
-
-handle(Req, State) ->
- Headers = proplists:get_value(headers, State, []),
- Body = proplists:get_value(body, State, "http_handler"),
- {ok, cowboy_req:reply(200, Headers, Body, Req), State}.
+ Headers = proplists:get_value(headers, Opts, []),
+ Body = proplists:get_value(body, Opts, "http_handler"),
+ {ok, cowboy_req:reply(200, Headers, Body, Req), Opts}.