diff options
author | Loïc Hoguin <[email protected]> | 2016-04-30 14:41:10 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-04-30 14:41:10 +0200 |
commit | ff936ff0ee62731d54ec35335355f76577044443 (patch) | |
tree | 806e766c619333378c960bf54128d907a6b4094e /examples/hello_world/src/toppage_handler.erl | |
parent | 45158c1da454b5c7406418afeccaecf54232deeb (diff) | |
download | cowboy-ff936ff0ee62731d54ec35335355f76577044443.tar.gz cowboy-ff936ff0ee62731d54ec35335355f76577044443.tar.bz2 cowboy-ff936ff0ee62731d54ec35335355f76577044443.zip |
Fix hello_world example
Diffstat (limited to 'examples/hello_world/src/toppage_handler.erl')
-rw-r--r-- | examples/hello_world/src/toppage_handler.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/hello_world/src/toppage_handler.erl b/examples/hello_world/src/toppage_handler.erl index e8e672e..eb95bf3 100644 --- a/examples/hello_world/src/toppage_handler.erl +++ b/examples/hello_world/src/toppage_handler.erl @@ -6,7 +6,7 @@ -export([init/2]). init(Req, Opts) -> - Req2 = cowboy_req:reply(200, [ - {<<"content-type">>, <<"text/plain">>} - ], <<"Hello world!">>, Req), - {ok, Req2, Opts}. + cowboy_req:reply(200, #{ + <<"content-type">> => <<"text/plain">> + }, <<"Hello world!">>, Req), + {ok, Req, Opts}. |