aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ssl_hello_world/src/toppage_handler.erl
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/ssl_hello_world/src/toppage_handler.erl
parentaa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac (diff)
downloadcowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.gz
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.bz2
cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.zip
Make reply functions return Req
Diffstat (limited to 'examples/ssl_hello_world/src/toppage_handler.erl')
-rw-r--r--examples/ssl_hello_world/src/toppage_handler.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/ssl_hello_world/src/toppage_handler.erl b/examples/ssl_hello_world/src/toppage_handler.erl
index eb95bf3..a5a8458 100644
--- a/examples/ssl_hello_world/src/toppage_handler.erl
+++ b/examples/ssl_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}.