diff options
author | Loïc Hoguin <[email protected]> | 2013-01-19 17:20:35 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-01-19 17:20:35 +0100 |
commit | 82de4254ddeff748c28c2086f43fb0d73015932f (patch) | |
tree | 6bcf196fc56a78cbfb021c6067dcc73b4e87277d /examples/echo_post/src | |
parent | 645556a80ac1f906a995b107df762756cd105324 (diff) | |
download | cowboy-82de4254ddeff748c28c2086f43fb0d73015932f.tar.gz cowboy-82de4254ddeff748c28c2086f43fb0d73015932f.tar.bz2 cowboy-82de4254ddeff748c28c2086f43fb0d73015932f.zip |
Make cowboy_req:has_body/1 return boolean()
This makes it similar to the other has_* functions.
Diffstat (limited to 'examples/echo_post/src')
-rw-r--r-- | examples/echo_post/src/toppage_handler.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/echo_post/src/toppage_handler.erl b/examples/echo_post/src/toppage_handler.erl index 808ba8e..21e1dc6 100644 --- a/examples/echo_post/src/toppage_handler.erl +++ b/examples/echo_post/src/toppage_handler.erl @@ -12,9 +12,9 @@ init(_Transport, Req, []) -> handle(Req, State) -> {Method, Req2} = cowboy_req:method(Req), - {HasBody, Req3} = cowboy_req:has_body(Req2), - {ok, Req4} = maybe_echo(Method, HasBody, Req3), - {ok, Req4, State}. + HasBody = cowboy_req:has_body(Req2), + {ok, Req3} = maybe_echo(Method, HasBody, Req2), + {ok, Req3, State}. maybe_echo(<<"POST">>, true, Req) -> {ok, PostVals, Req2} = cowboy_req:body_qs(Req), |