From 348cfe494318d0c12072fd75ff451c3b40168965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 14 Sep 2016 18:52:59 +0200 Subject: Update documentation --- docs/en/cowboy/2.0/guide/req/index.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'docs/en/cowboy/2.0/guide/req') diff --git a/docs/en/cowboy/2.0/guide/req/index.html b/docs/en/cowboy/2.0/guide/req/index.html index 7d4aee5a..42e3c089 100644 --- a/docs/en/cowboy/2.0/guide/req/index.html +++ b/docs/en/cowboy/2.0/guide/req/index.html @@ -98,15 +98,15 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
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. They may change in future releases, including maintenance releases, without notice.

@@ -205,11 +205,11 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
#{
-        scheme := Scheme,
-        host := Host,
-        port := Port,
-        path := Path,
-        qs := Qs
+    scheme := Scheme,
+    host := Host,
+    port := Port,
+    path := Path,
+    qs := Qs
 } = Req.

Or using the related functions:

@@ -444,7 +444,7 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
ParsedVal = cowboy_req:parse_header(<<"content-type">>, Req,
-        {<<"text">>, <<"plain">>, []}).
+ {<<"text">>, <<"plain">>, []}).
-- cgit v1.2.3