diff options
Diffstat (limited to 'test/http_SUITE_data/http_echo_body.erl')
-rw-r--r-- | test/http_SUITE_data/http_echo_body.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/http_SUITE_data/http_echo_body.erl b/test/http_SUITE_data/http_echo_body.erl index 986015a..8743844 100644 --- a/test/http_SUITE_data/http_echo_body.erl +++ b/test/http_SUITE_data/http_echo_body.erl @@ -1,11 +1,12 @@ %% Feel free to use, reuse and abuse the code in this file. -module(http_echo_body). --behaviour(cowboy_http_handler). --export([init/3, handle/2, terminate/3]). -init({_, http}, Req, _) -> - {ok, Req, undefined}. +-export([init/2]). +-export([handle/2]). + +init(Req, Opts) -> + {http, Req, Opts}. handle(Req, State) -> true = cowboy_req:has_body(Req), @@ -22,6 +23,3 @@ handle_body(Req, Body) -> Size = cowboy_req:body_length(Req), Size = byte_size(Body), cowboy_req:reply(200, [], Body, Req). - -terminate(_, _, _) -> - ok. |