aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/handlers.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-01-02 14:20:15 +0100
committerLoïc Hoguin <[email protected]>2017-01-02 14:46:19 +0100
commit271e31c629be2dff93d68e01c9a8a9c5c34b7e2c (patch)
treeb20ba4f01a174479c1cde0d7abb610dbfa757d05 /doc/src/guide/handlers.asciidoc
parent5838a0c81a978377084b33fd086de10f9775f425 (diff)
downloadcowboy-271e31c629be2dff93d68e01c9a8a9c5c34b7e2c.tar.gz
cowboy-271e31c629be2dff93d68e01c9a8a9c5c34b7e2c.tar.bz2
cowboy-271e31c629be2dff93d68e01c9a8a9c5c34b7e2c.zip
Various fixes and tweaks to the user guide
Diffstat (limited to 'doc/src/guide/handlers.asciidoc')
-rw-r--r--doc/src/guide/handlers.asciidoc9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/src/guide/handlers.asciidoc b/doc/src/guide/handlers.asciidoc
index 88fbc21..e073dfb 100644
--- a/doc/src/guide/handlers.asciidoc
+++ b/doc/src/guide/handlers.asciidoc
@@ -29,9 +29,9 @@ We need to use the Req object to reply.
[source,erlang]
----
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}.
----
@@ -81,8 +81,7 @@ xref:sub_protocols[Sub protocols] chapter.
=== 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.
[source,erlang]
----