|
@@ -8,8 +8,8 @@
|
|
init(Req, Opts) ->
|
|
init(Req, Opts) ->
|
|
Method = cowboy_req:method(Req),
|
|
Method = cowboy_req:method(Req),
|
|
#{echo := Echo} = cowboy_req:match_qs([echo], Req),
|
|
#{echo := Echo} = cowboy_req:match_qs([echo], Req),
|
|
- Req2 = echo(Method, Echo, Req),
|
|
|
|
- {ok, Req2, Opts}.
|
|
|
|
|
|
+ echo(Method, Echo, Req),
|
|
|
|
+ {ok, Req, Opts}.
|
|
|
|
|
|
echo(<<"GET">>, undefined, Req) ->
|
|
echo(<<"GET">>, undefined, Req) ->
|
|
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);
|
|
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);
|