aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/templates/docs_lang.html
diff options
context:
space:
mode:
Diffstat (limited to 'libpathod/templates/docs_lang.html')
-rw-r--r--libpathod/templates/docs_lang.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/libpathod/templates/docs_lang.html b/libpathod/templates/docs_lang.html
index 4ed7f151..e67b13c5 100644
--- a/libpathod/templates/docs_lang.html
+++ b/libpathod/templates/docs_lang.html
@@ -11,6 +11,7 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#specifying_responses" data-toggle="tab">Responses</a></li>
<li><a href="#specifying_requests" data-toggle="tab">Requests</a></li>
+ <li><a href="#websockets" data-toggle="tab">Websockets</a></li>
</ul>
<div class="tab-content">
@@ -199,6 +200,43 @@
</table>
</div>
+ <div class="tab-pane" id="websockets">
+
+ <p>Requests and responses can be decorated with the <b>ws</b> prefix to
+ create a websockets client or server handshake. Since the websocket
+ specifier implies a request method (GET) and a response code (102),
+ these can optionally be omitted. All other request and response
+ features can be applied, and websocket-specific headers can be
+ over-ridden explicitly.</p>
+
+ <h2>Request</h2>
+
+ <pre class="example">ws:[method:]path:[colon-separated list of features]</pre></p>
+
+ <p>This will generate a wsocket client handshake with a GET method:</p>
+
+ <pre class="example">ws:/</pre></p>
+
+ <p>This will do the same, but using the (invalid) PUT method:</p>
+
+ <pre class="example">ws:put:/</pre></p>
+
+
+ <h2>Response</h2>
+
+ <pre class="example">ws[:code:][colon-separated list of features]</pre></p>
+
+ <p>This will generate a simple protocol acceptance with a 101 response
+ code:</p>
+
+ <pre class="example">ws</pre></p>
+
+ <p>This will do the same, but using the (invalid) 202 code:</p>
+
+ <pre class="example">ws:202</pre></p>
+
+ </div>
+
</div>