From 99cb0808abfa3bd5bbc8d19c10756641c032dc48 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 22 Apr 2015 15:49:17 +1200 Subject: websockets: server handshake scheme Also refactor settings and resolution interfaces --- libpathod/templates/docs_lang.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'libpathod/templates/docs_lang.html') 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 @@
@@ -199,6 +200,43 @@
+
+ +

Requests and responses can be decorated with the ws 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.

+ +

Request

+ +
ws:[method:]path:[colon-separated list of features]

+ +

This will generate a wsocket client handshake with a GET method:

+ +
ws:/

+ +

This will do the same, but using the (invalid) PUT method:

+ +
ws:put:/

+ + +

Response

+ +
ws[:code:][colon-separated list of features]

+ +

This will generate a simple protocol acceptance with a 101 response + code:

+ +
ws

+ +

This will do the same, but using the (invalid) 202 code:

+ +
ws:202

+ +
+ -- cgit v1.2.3