diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-04 09:54:59 +1200 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-04 09:54:59 +1200 |
| commit | 179cc8dc1fd40fb44e8795af43ba6c4e22b22b0d (patch) | |
| tree | 1a5f47bd3b4cf02f8c23ede2002bc8bfdda34462 /libpathod/templates/docs_lang_responses.html | |
| parent | 4b2e00acb3d03716db10d78368ba946da1388c32 (diff) | |
| download | mitmproxy-179cc8dc1fd40fb44e8795af43ba6c4e22b22b0d.tar.gz mitmproxy-179cc8dc1fd40fb44e8795af43ba6c4e22b22b0d.tar.bz2 mitmproxy-179cc8dc1fd40fb44e8795af43ba6c4e22b22b0d.zip | |
Split up language docs, document websocket code specification.
Diffstat (limited to 'libpathod/templates/docs_lang_responses.html')
| -rw-r--r-- | libpathod/templates/docs_lang_responses.html | 90 |
1 files changed, 90 insertions, 0 deletions
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 @@ + +<pre class="example">code:[colon-separated list of features]</pre></p> + +<table class="table table-bordered"> + <tbody > + <tr> + <td> code </td> + <td> + <p>An integer specifying the HTTP response code.</p> + + <p>The special method <b>ws</b> 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.</p> + </td> + </tr> + + <tr> + <td> b<a href="#valuespec">VALUE</a> </td> + <td> + Set the body. The appropriate Content-Length header is + added automatically unless the "r" flag is set. + </td> + </tr> + + <tr> + <td> c<a href="#valuespec">VALUE</a> </td> + <td> + A shortcut for setting the Content-Type header. Equivalent to + h"Content-Type"=VALUE + </td> + </tr> + + <tr> + <td> d<a href="#offsetspec">OFFSET</a> </td> + <td> + Disconnect after OFFSET bytes. + </td> + </tr> + + <tr> + <td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td> + <td> + Set a header. + </td> + </tr> + + + <tr> + <td> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td> + <td> + Inject the specified value at the offset. + </td> + </tr> + + <tr> + <td> l<a href="#valuespec">VALUE</a> </td> + <td> + A shortcut for setting the Location header. Equivalent to + h"Location"=VALUE + </td> + </tr> + + <tr> + <td> m<a href="#valuespec">VALUE</a> </td> + <td> + HTTP Reason message. Automatically chosen according to + the response code if not specified. + </td> + </tr> + + <tr> + <td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td> + <td> + Pause for SECONDS seconds after OFFSET bytes. SECONDS can + be an integer or "f" to pause forever. + </td> + </tr> + + <tr> + <td> r </td> + <td> + 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. + </td> + </tr> + </tbody> +</table> |
