From 179cc8dc1fd40fb44e8795af43ba6c4e22b22b0d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 4 May 2015 09:54:59 +1200 Subject: Split up language docs, document websocket code specification. --- libpathod/templates/docs_lang_responses.html | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 libpathod/templates/docs_lang_responses.html (limited to 'libpathod/templates/docs_lang_responses.html') diff --git a/libpathod/templates/docs_lang_responses.html b/libpathod/templates/docs_lang_responses.html new file mode 100644 index 00000000..e8590add --- /dev/null +++ b/libpathod/templates/docs_lang_responses.html @@ -0,0 +1,90 @@ + +
code:[colon-separated list of features]

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
code +

An integer specifying the HTTP response code.

+ +

The special method ws creates a valid + websocket upgrade response (code 101), and moves pathod + to websocket mode. Apart from that, websocket responses + are just like any other, and all aspects of the + response can be over-ridden.

+
bVALUE + Set the body. The appropriate Content-Length header is + added automatically unless the "r" flag is set. +
cVALUE + A shortcut for setting the Content-Type header. Equivalent to + h"Content-Type"=VALUE +
dOFFSET + Disconnect after OFFSET bytes. +
hVALUE=VALUE + Set a header. +
iOFFSET,VALUE + Inject the specified value at the offset. +
lVALUE + A shortcut for setting the Location header. Equivalent to + h"Location"=VALUE +
mVALUE + HTTP Reason message. Automatically chosen according to + the response code if not specified. +
pOFFSET,SECONDS + Pause for SECONDS seconds after OFFSET bytes. SECONDS can + be an integer or "f" to pause forever. +
r + Set the "raw" flag on this response. Pathod will not + calculate a Content-Length header if a body is set, or add + a Date header to the response. +
-- cgit v1.2.3