From 7839f1367194813c70d7e223a476f96a62b298ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 24 Aug 2016 17:25:33 +0200 Subject: More 2.0 documentation updates Still incomplete. --- doc/src/guide/getting_started.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/src/guide/getting_started.asciidoc') diff --git a/doc/src/guide/getting_started.asciidoc b/doc/src/guide/getting_started.asciidoc index a4e5637..e9a2756 100644 --- a/doc/src/guide/getting_started.asciidoc +++ b/doc/src/guide/getting_started.asciidoc @@ -106,7 +106,7 @@ chapter. For this tutorial we map the path `/` to the handler module `hello_handler`. This module doesn't exist yet. Build and start the release, then open http://localhost:8080 -in your browser. You will get an error because the module is missing. +in your browser. You will get a 500 error because the module is missing. Any other URL, like http://localhost:8080/test, will result in a 404 error. @@ -126,11 +126,11 @@ the `init/2` function like this to send a reply. [source,erlang] ---- -init(Req, State) -> - cowboy_req:reply(200, +init(Req0, State) -> + Req = cowboy_req:reply(200, #{<<"content-type">> => <<"text/plain">>}, <<"Hello Erlang!">>, - Req), + Req0), {ok, Req, State}. ---- -- cgit v1.2.3