summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.5/guide/handlers/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.5/guide/handlers/index.html')
-rw-r--r--docs/en/cowboy/2.5/guide/handlers/index.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/en/cowboy/2.5/guide/handlers/index.html b/docs/en/cowboy/2.5/guide/handlers/index.html
index d97992b1..0ac0d42c 100644
--- a/docs/en/cowboy/2.5/guide/handlers/index.html
+++ b/docs/en/cowboy/2.5/guide/handlers/index.html
@@ -67,7 +67,7 @@
<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
<p>A handler that does nothing would look like this:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -76,7 +76,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
<p>We need to use the Req object to reply.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -93,7 +93,7 @@ http://www.gnu.org/software/src-highlite -->
<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -102,7 +102,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -169,6 +169,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowboy/2.7/guide">2.7</a></li>
+
<li><a href="/docs/en/cowboy/2.6/guide">2.6</a></li>
<li><a href="/docs/en/cowboy/2.5/guide">2.5</a></li>