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>
|
||||
</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="page-header">
|
||||
<h1>Responses</h1>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="specifying_responses">
|
||||
<p>The general form of a response is as follows:</p>
|
||||
|
||||
<pre class="example">code[MESSAGE]:[colon-separated list of features]</pre></p>
|
||||
|
||||
<p>The general form of a response is as follows:</p>
|
||||
|
||||
<pre class="example">code[MESSAGE]:[colon-separated list of features]</pre></p>
|
||||
<table class="table table-bordered">
|
||||
<tbody >
|
||||
<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">
|
||||
<tbody >
|
||||
<tr>
|
||||
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set a header.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> b<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set the body. When the body is set, pathod will
|
||||
automatically set the appropriate Content-Length header.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> b<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set the body. When the body is set, pathod will
|
||||
automatically set the appropriate Content-Length header.
|
||||
</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> 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> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Inject the specified value at the offset.
|
||||
</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> l<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
A shortcut for setting the Location header. Equivalent to
|
||||
h"Location"=VALUE
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
||||
<td>
|
||||
Disconnect after OFFSET bytes.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> d<a href="#offsetspec">OFFSET</a> </td>
|
||||
<td>
|
||||
Disconnect after OFFSET bytes.
|
||||
</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> 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>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="specifying_requests">
|
||||
<div class="page-header">
|
||||
<h1>Requests</h1>
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<tbody >
|
||||
<tr>
|
||||
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set a header.
|
||||
</td>
|
||||
</tr>
|
||||
<div class="tab-pane" id="specifying_requests">
|
||||
<p>The general form of a request is as follows:</p>
|
||||
|
||||
<pre class="example">method:path:[colon-separated list of features]</pre></p>
|
||||
|
||||
<tr>
|
||||
<td> b<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set the body. When the body is set, pathod will
|
||||
automatically set the appropriate Content-Length header.
|
||||
</td>
|
||||
</tr>
|
||||
<table class="table table-bordered">
|
||||
<tbody >
|
||||
<tr>
|
||||
<td> h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set a header.
|
||||
</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> b<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Set the body. When the body is set, pathod will
|
||||
automatically set the appropriate Content-Length 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> 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> i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a> </td>
|
||||
<td>
|
||||
Inject the specified value at the offset.
|
||||
</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> d<a href="#offsetspec">OFFSET</a> </td>
|
||||
<td>
|
||||
Disconnect after OFFSET bytes.
|
||||
</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>
|
||||
<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>
|
||||
|
||||
</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">
|
||||
|
@ -31,7 +31,6 @@ various other goodies. Try it by visiting the server root:</p>
|
||||
|
||||
<pre class="example">http://localhost:9999</pre>
|
||||
|
||||
|
||||
<section id="api">
|
||||
<div class="page-header">
|
||||
<h1>API</h1>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<input type="submit" class="btn" value="preview">
|
||||
</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">
|
||||
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
||||
|
@ -13,7 +13,8 @@
|
||||
{% endif %}
|
||||
</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">
|
||||
<p>Check out the <a href="/docs/language">complete language docs</a>. Here
|
||||
are some examples to get you started:</p>
|
||||
|
Loading…
Reference in New Issue
Block a user