summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.0/guide/handlers.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.0/guide/handlers.asciidoc')
-rw-r--r--docs/en/cowboy/2.0/guide/handlers.asciidoc9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/en/cowboy/2.0/guide/handlers.asciidoc b/docs/en/cowboy/2.0/guide/handlers.asciidoc
index 88fbc21f..e073dfb6 100644
--- a/docs/en/cowboy/2.0/guide/handlers.asciidoc
+++ b/docs/en/cowboy/2.0/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]
----