diff options
author | Loïc Hoguin <[email protected]> | 2016-08-24 17:25:33 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-24 17:25:33 +0200 |
commit | 7839f1367194813c70d7e223a476f96a62b298ae (patch) | |
tree | d5f7be7d443c47dfc67856e9c10474232cb79686 /doc/src/guide/getting_started.asciidoc | |
parent | b9ad02d3057e78ff82dacbd38042e33073c4bc75 (diff) | |
download | cowboy-7839f1367194813c70d7e223a476f96a62b298ae.tar.gz cowboy-7839f1367194813c70d7e223a476f96a62b298ae.tar.bz2 cowboy-7839f1367194813c70d7e223a476f96a62b298ae.zip |
More 2.0 documentation updates
Still incomplete.
Diffstat (limited to 'doc/src/guide/getting_started.asciidoc')
-rw-r--r-- | doc/src/guide/getting_started.asciidoc | 8 |
1 files changed, 4 insertions, 4 deletions
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}. ---- |