aboutsummaryrefslogtreecommitdiffstats
path: root/examples/echo_post/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/echo_post/src')
-rw-r--r--examples/echo_post/src/toppage_handler.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/echo_post/src/toppage_handler.erl b/examples/echo_post/src/toppage_handler.erl
index e9fab15..de1f2ad 100644
--- a/examples/echo_post/src/toppage_handler.erl
+++ b/examples/echo_post/src/toppage_handler.erl
@@ -11,10 +11,10 @@ init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
- {Method, Req2} = cowboy_req:method(Req),
- HasBody = cowboy_req:has_body(Req2),
- {ok, Req3} = maybe_echo(Method, HasBody, Req2),
- {ok, Req3, State}.
+ Method = cowboy_req:method(Req),
+ HasBody = cowboy_req:has_body(Req),
+ Req2 = maybe_echo(Method, HasBody, Req),
+ {ok, Req2, State}.
maybe_echo(<<"POST">>, true, Req) ->
{ok, PostVals, Req2} = cowboy_req:body_qs(Req),