0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix small issue in echo_get example

This commit is contained in:
Loïc Hoguin 2016-06-09 16:25:00 +02:00
parent def0bc530b
commit 5ca49fefa9

View file

@ -8,8 +8,8 @@
init(Req, Opts) ->
Method = cowboy_req:method(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) ->
cowboy_req:reply(400, [], <<"Missing echo parameter.">>, Req);