diff options
Diffstat (limited to 'examples/echo_get/src')
-rw-r--r-- | examples/echo_get/src/toppage_handler.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/echo_get/src/toppage_handler.erl b/examples/echo_get/src/toppage_handler.erl index 4c7f595..f89abab 100644 --- a/examples/echo_get/src/toppage_handler.erl +++ b/examples/echo_get/src/toppage_handler.erl @@ -5,10 +5,10 @@ -export([init/2]). -init(Req, Opts) -> - Method = cowboy_req:method(Req), - #{echo := Echo} = cowboy_req:match_qs([echo], Req), - echo(Method, Echo, Req), +init(Req0, Opts) -> + Method = cowboy_req:method(Req0), + #{echo := Echo} = cowboy_req:match_qs([echo], Req0), + Req = echo(Method, Echo, Req0), {ok, Req, Opts}. echo(<<"GET">>, undefined, Req) -> |