From fdc955ab18ba2fe285c75b75a8b92cf9f9436adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 2 Jan 2017 19:56:53 +0100 Subject: Update docs --- docs/en/cowboy/2.0/guide/handlers/index.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs/en/cowboy/2.0/guide/handlers/index.html') diff --git a/docs/en/cowboy/2.0/guide/handlers/index.html b/docs/en/cowboy/2.0/guide/handlers/index.html index a9d21a16..f1b3649d 100644 --- a/docs/en/cowboy/2.0/guide/handlers/index.html +++ b/docs/en/cowboy/2.0/guide/handlers/index.html @@ -96,9 +96,9 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
init(Req0, State) ->
-    Req = cowboy_req:reply(200, [
-        {<<"content-type">>, <<"text/plain">>}
-    ], <<"Hello World!">>, Req0),
+    Req = cowboy_req:reply(200, #{
+        <<"content-type">> => <<"text/plain">>
+    }, <<"Hello World!">>, Req0),
     {ok, Req, State}.

Cowboy will immediately send a response when cowboy:reply/4 is called.

@@ -146,8 +146,7 @@ http://www.gnu.org/software/src-highlite -->

Cleaning up

-

With the exception of Websocket handlers, all handler types -provide the optional terminate/3 callback.

+

All handler types provide the optional terminate/3 callback.