diff options
author | Loïc Hoguin <[email protected]> | 2017-01-02 19:56:53 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-01-02 19:56:53 +0100 |
commit | fdc955ab18ba2fe285c75b75a8b92cf9f9436adc (patch) | |
tree | e038f2df840c2583e374cee21e240c3082f25186 /docs/en/cowboy/2.0/guide/handlers.asciidoc | |
parent | 1780abb415b1a9c27c3a1f53267e9689da6b0005 (diff) | |
download | ninenines.eu-fdc955ab18ba2fe285c75b75a8b92cf9f9436adc.tar.gz ninenines.eu-fdc955ab18ba2fe285c75b75a8b92cf9f9436adc.tar.bz2 ninenines.eu-fdc955ab18ba2fe285c75b75a8b92cf9f9436adc.zip |
Update docs
Diffstat (limited to 'docs/en/cowboy/2.0/guide/handlers.asciidoc')
-rw-r--r-- | docs/en/cowboy/2.0/guide/handlers.asciidoc | 9 |
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] ---- |