aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/req.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
commit31cabe0fb98b4c75cb088761ba5ad53dbd2285ee (patch)
treef38d722f59530b0db689a4c06f5339620a1e5f6f /doc/src/guide/req.asciidoc
parenta231216b07876293dbcfde020cb0228510c5064d (diff)
downloadcowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.gz
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.bz2
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.zip
Use spaces in snippets in the guide
Diffstat (limited to 'doc/src/guide/req.asciidoc')
-rw-r--r--doc/src/guide/req.asciidoc28
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/src/guide/req.asciidoc b/doc/src/guide/req.asciidoc
index 5bd6701..9afee09 100644
--- a/doc/src/guide/req.asciidoc
+++ b/doc/src/guide/req.asciidoc
@@ -32,15 +32,15 @@ otherwise.
[source,erlang]
----
init(Req0=#{method := <<"GET">>}, State) ->
- Req = cowboy_req:reply(200, #{
- <<"content-type">> => <<"text/plain">>
- }, <<"Hello world!">>, Req0),
- {ok, Req, State};
+ Req = cowboy_req:reply(200, #{
+ <<"content-type">> => <<"text/plain">>
+ }, <<"Hello world!">>, Req0),
+ {ok, Req, State};
init(Req0, State) ->
- Req = cowboy_req:reply(405, #{
- <<"allow">> => <<"GET">>
- }, Req0),
- {ok, Req, State}.
+ Req = cowboy_req:reply(405, #{
+ <<"allow">> => <<"GET">>
+ }, Req0),
+ {ok, Req, State}.
----
Any other field is internal and should not be accessed.
@@ -135,11 +135,11 @@ of the effective request URI can all be retrieved directly:
[source,erlang]
----
#{
- scheme := Scheme,
- host := Host,
- port := Port,
- path := Path,
- qs := Qs
+ scheme := Scheme,
+ host := Host,
+ port := Port,
+ path := Path,
+ qs := Qs
} = Req.
----
@@ -348,7 +348,7 @@ directly:
[source,erlang]
----
ParsedVal = cowboy_req:parse_header(<<"content-type">>, Req,
- {<<"text">>, <<"plain">>, []}).
+ {<<"text">>, <<"plain">>, []}).
----
=== Peer