mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Use tabs for request/response definitions on language docs page.
This commit is contained in:
parent
87306164a6
commit
adac9a35c3
@ -8,152 +8,150 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<section id="specifying_responses">
|
<div class="tab-content">
|
||||||
<div class="page-header">
|
<div class="tab-pane active" id="specifying_responses">
|
||||||
<h1>Responses</h1>
|
<p>The general form of a response is as follows:</p>
|
||||||
</div>
|
|
||||||
|
<pre class="example">code[MESSAGE]:[colon-separated list of features]</pre></p>
|
||||||
|
|
||||||
<p>The general form of a response is as follows:</p>
|
<table class="table table-bordered">
|
||||||
|
<tbody >
|
||||||
<pre class="example">code[MESSAGE]:[colon-separated list of features]</pre></p>
|
<tr>
|
||||||
|
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
||||||
|
<td>
|
||||||
|
Set a header.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<table class="table table-bordered">
|
<tr>
|
||||||
<tbody >
|
<td> b<a href="#valuespec">VALUE</a> </td>
|
||||||
<tr>
|
<td>
|
||||||
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
Set the body. When the body is set, pathod will
|
||||||
<td>
|
automatically set the appropriate Content-Length header.
|
||||||
Set a header.
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> b<a href="#valuespec">VALUE</a> </td>
|
<td> c<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
Set the body. When the body is set, pathod will
|
A shortcut for setting the Content-Type header. Equivalent to
|
||||||
automatically set the appropriate Content-Length header.
|
h"Content-Type"=VALUE
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> c<a href="#valuespec">VALUE</a> </td>
|
<td> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
A shortcut for setting the Content-Type header. Equivalent to
|
Inject the specified value at the offset.
|
||||||
h"Content-Type"=VALUE
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
<td> l<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
Inject the specified value at the offset.
|
A shortcut for setting the Location header. Equivalent to
|
||||||
</td>
|
h"Location"=VALUE
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> l<a href="#valuespec">VALUE</a> </td>
|
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
||||||
<td>
|
<td>
|
||||||
A shortcut for setting the Location header. Equivalent to
|
Disconnect after OFFSET bytes.
|
||||||
h"Location"=VALUE
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
<td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
|
||||||
<td>
|
<td>
|
||||||
Disconnect after OFFSET bytes.
|
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
|
||||||
</td>
|
be an integer or "f" to pause forever.
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
|
<td> r </td>
|
||||||
<td>
|
<td>
|
||||||
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
|
Set the "raw" flag on this response. Pathod will not
|
||||||
be an integer or "f" to pause forever.
|
calculate a Content-Length header if a body is set, or add
|
||||||
</td>
|
a Date header to the response.
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
</tbody>
|
||||||
<td> r </td>
|
</table>
|
||||||
<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>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section id="specifying_requests">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>Requests</h1>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>The general form of a request is as follows:</p>
|
|
||||||
|
|
||||||
<pre class="example">method:path:[colon-separated list of features]</pre></p>
|
|
||||||
|
|
||||||
<table class="table table-bordered">
|
<div class="tab-pane" id="specifying_requests">
|
||||||
<tbody >
|
<p>The general form of a request is as follows:</p>
|
||||||
<tr>
|
|
||||||
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
<pre class="example">method:path:[colon-separated list of features]</pre></p>
|
||||||
<td>
|
|
||||||
Set a header.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<table class="table table-bordered">
|
||||||
<td> b<a href="#valuespec">VALUE</a> </td>
|
<tbody >
|
||||||
<td>
|
<tr>
|
||||||
Set the body. When the body is set, pathod will
|
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
||||||
automatically set the appropriate Content-Length header.
|
<td>
|
||||||
</td>
|
Set a header.
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> c<a href="#valuespec">VALUE</a> </td>
|
<td> b<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
A shortcut for setting the Content-Type header. Equivalent to
|
Set the body. When the body is set, pathod will
|
||||||
h"Content-Type"=VALUE
|
automatically set the appropriate Content-Length header.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
<td> c<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
Inject the specified value at the offset.
|
A shortcut for setting the Content-Type header. Equivalent to
|
||||||
</td>
|
h"Content-Type"=VALUE
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
<td> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
||||||
<td>
|
<td>
|
||||||
Disconnect after OFFSET bytes.
|
Inject the specified value at the offset.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
|
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
||||||
<td>
|
<td>
|
||||||
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
|
Disconnect after OFFSET bytes.
|
||||||
be an integer or "f" to pause forever.
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> r </td>
|
<td> p<a href="#offsetspec">OFFSET</a>,SECONDS </td>
|
||||||
<td>
|
<td>
|
||||||
Set the "raw" flag on this response. Pathod will not
|
Pause for SECONDS seconds after OFFSET bytes. SECONDS can
|
||||||
calculate a Content-Length header if a body is set, or add
|
be an integer or "f" to pause forever.
|
||||||
a Date header to the response.
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</section>
|
<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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<section id="specifying_requests">
|
<section id="specifying_requests">
|
||||||
|
@ -31,7 +31,6 @@ various other goodies. Try it by visiting the server root:</p>
|
|||||||
|
|
||||||
<pre class="example">http://localhost:9999</pre>
|
<pre class="example">http://localhost:9999</pre>
|
||||||
|
|
||||||
|
|
||||||
<section id="api">
|
<section id="api">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>API</h1>
|
<h1>API</h1>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<input type="submit" class="btn" value="preview">
|
<input type="submit" class="btn" value="preview">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<a data-toggle="collapse" data-target="#requestexamples">Don't know what to type?</a>
|
<a data-toggle="collapse" data-target="#requestexamples">Examples...</a>
|
||||||
|
|
||||||
<div id="requestexamples" class="collapse">
|
<div id="requestexamples" class="collapse">
|
||||||
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<a data-toggle="collapse" data-target="#responseexamples">Don't know what to type?</a>
|
<a data-toggle="collapse" data-target="#responseexamples">Examples...</a>
|
||||||
|
|
||||||
<div id="responseexamples" class="collapse">
|
<div id="responseexamples" class="collapse">
|
||||||
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
||||||
are some examples to get you started:</p>
|
are some examples to get you started:</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user