aboutsummaryrefslogtreecommitdiffstats
path: root/examples/hello_world/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 17:15:02 +0200
commite30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 (patch)
tree5eb48865b2ad61d3c05bdc0e3e1f639a6b966ffe /examples/hello_world/src
parentaa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac (diff)
downloadcowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.gz
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.bz2
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.zip
Make reply functions return Req
Diffstat (limited to 'examples/hello_world/src')
-rw-r--r--examples/hello_world/src/toppage_handler.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/hello_world/src/toppage_handler.erl b/examples/hello_world/src/toppage_handler.erl
index eb95bf3..a5a8458 100644
--- a/examples/hello_world/src/toppage_handler.erl
+++ b/examples/hello_world/src/toppage_handler.erl
@@ -5,8 +5,8 @@
-export([init/2]).
-init(Req, Opts) ->
- cowboy_req:reply(200, #{
+init(Req0, Opts) ->
+ Req = cowboy_req:reply(200, #{
<<"content-type">> => <<"text/plain">>
- }, <<"Hello world!">>, Req),
+ }, <<"Hello world!">>, Req0),
{ok, Req, Opts}.