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

Update examples to the new interface

This commit is contained in:
Loïc Hoguin 2016-08-10 14:33:43 +02:00
parent 00f3ae7d20
commit ae95e87eb1
5 changed files with 11 additions and 11 deletions

View file

@ -12,7 +12,7 @@ init(Req, Opts) ->
{ok, Req2, Opts}.
maybe_echo(<<"POST">>, true, Req) ->
{ok, PostVals, Req2} = cowboy_req:body_qs(Req),
{ok, PostVals, Req2} = cowboy_req:read_urlencoded_body(Req),
Echo = proplists:get_value(<<"echo">>, PostVals),
echo(Echo, Req2),
Req2;