From e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 10 Aug 2016 17:15:02 +0200 Subject: Make reply functions return Req --- examples/ssl_hello_world/src/toppage_handler.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/ssl_hello_world') 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}. -- cgit v1.2.3