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:
parent
def0bc530b
commit
5ca49fefa9
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
echo(Method, Echo, Req),
|
||||||
{ok, Req2, Opts}.
|
{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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue