summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.0/guide/req.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 18:52:59 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 18:52:59 +0200
commit348cfe494318d0c12072fd75ff451c3b40168965 (patch)
treedc0186d61b759b248a774cd364d8cb4e073a0c41 /docs/en/cowboy/2.0/guide/req.asciidoc
parenta0db20721bee71e7c0558a83d94ac0c8927b3939 (diff)
downloadninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.tar.gz
ninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.tar.bz2
ninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.zip
Update documentation
Diffstat (limited to 'docs/en/cowboy/2.0/guide/req.asciidoc')
-rw-r--r--docs/en/cowboy/2.0/guide/req.asciidoc28
1 files changed, 14 insertions, 14 deletions
diff --git a/docs/en/cowboy/2.0/guide/req.asciidoc b/docs/en/cowboy/2.0/guide/req.asciidoc
index 5bd6701c..9afee098 100644
--- a/docs/en/cowboy/2.0/guide/req.asciidoc
+++ b/docs/en/cowboy/2.0/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