mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Make reply functions return Req
This commit is contained in:
parent
aa6f2ab5a4
commit
e30d120bd8
16 changed files with 109 additions and 108 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue