aboutsummaryrefslogtreecommitdiffstats
path: root/examples/echo_post
diff options
context:
space:
mode:
Diffstat (limited to 'examples/echo_post')
-rw-r--r--examples/echo_post/src/toppage_handler.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/echo_post/src/toppage_handler.erl b/examples/echo_post/src/toppage_handler.erl
index a84bfe5..f52b6d4 100644
--- a/examples/echo_post/src/toppage_handler.erl
+++ b/examples/echo_post/src/toppage_handler.erl
@@ -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;