summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.2/guide/routing/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-04-04 13:13:37 +0200
committerLoïc Hoguin <[email protected]>2018-04-04 13:13:37 +0200
commitd2a3f2cedd7c00d0933222aed9c06b3149aa4db4 (patch)
tree4f1499bac639c782b250af0fbf0dec2064315813 /docs/en/cowboy/2.2/guide/routing/index.html
parent1d654719f5fa6be67d2c95145872068665702cb7 (diff)
downloadninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.tar.gz
ninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.tar.bz2
ninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.zip
Cowboy 2.3.0
Diffstat (limited to 'docs/en/cowboy/2.2/guide/routing/index.html')
-rw-r--r--docs/en/cowboy/2.2/guide/routing/index.html42
1 files changed, 22 insertions, 20 deletions
diff --git a/docs/en/cowboy/2.2/guide/routing/index.html b/docs/en/cowboy/2.2/guide/routing/index.html
index 1e1aad39..913ba0a8 100644
--- a/docs/en/cowboy/2.2/guide/routing/index.html
+++ b/docs/en/cowboy/2.2/guide/routing/index.html
@@ -7,7 +7,7 @@
<meta name="description" content="">
<meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
- <meta name="generator" content="Hugo 0.30.2" />
+ <meta name="generator" content="Hugo 0.37.1" />
<title>Nine Nines: Routing</title>
@@ -80,7 +80,7 @@ The result of the compilation is the dispatch rules.</p></div>
<div class="sectionbody">
<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -88,7 +88,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>Each host contains matching rules for the host along with optional
constraints, and a list of routes for the path component.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -97,7 +97,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>The list of routes for the path component is defined similar to the
list of hosts.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -106,7 +106,7 @@ http://www.gnu.org/software/src-highlite -->
optional constraints, and gives us the handler module to be used
along with its initial state.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -130,7 +130,7 @@ when encountered.</p></div>
the simplest match value is a host or a path. It can be given as either
a <code>string()</code> or a <code>binary()</code>.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -142,7 +142,7 @@ http://www.gnu.org/software/src-highlite -->
character. Note that these two paths are identical as far as routing
is concerned.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -151,7 +151,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
Similarly, hosts with and without a leading dot are also equivalent.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -165,7 +165,7 @@ values bindings.</p></div>
the <code>:</code> character means that what follows until the end of the segment
is the name of the binding in which the segment value will be stored.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -184,7 +184,7 @@ variable in Erlang. Any match against the <code>_</code> binding will succeed
but the data will be discarded. This is especially useful for
matching against many domain names in one go.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -192,7 +192,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
between brackets is optional.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -200,7 +200,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -213,7 +213,7 @@ zero, one or many segments. You can then find the segments using
<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
They will be represented as a list of segments.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -223,7 +223,7 @@ http://www.gnu.org/software/src-highlite -->
will succeed only if they share the same value. This copies the
Erlang pattern matching behavior.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -232,7 +232,7 @@ http://www.gnu.org/software/src-highlite -->
case the two values must be identical only if the segment is
available.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -240,7 +240,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
also share the same value.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -249,7 +249,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>Finally, there are two special match values that can be used. The
first is the atom <code>'_'</code> which will match any host or path.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -258,7 +258,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -291,7 +291,7 @@ Faster compilation strategies could be to compile the routes directly
to Erlang code, but would require heavier dependencies.</p></div>
<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -313,7 +313,7 @@ http://www.gnu.org/software/src-highlite -->
list used by routing. This will apply to all new connections accepted
by the listener:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -378,6 +378,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowboy/2.3/guide">2.3</a></li>
+
<li><a href="/docs/en/cowboy/2.2/guide">2.2</a></li>
<li><a href="/docs/en/cowboy/2.1/guide">2.1</a></li>