aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/templates/docs_lang_requests.html
blob: 81aff53587df700a46498397f31337e34adab27e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<pre class="example">method:path:[colon-separated list of features]</pre>
</p>

<table class="table table-bordered">
    <tbody>
        <tr>
            <td>method</td>
            <td>
                <p>
                    A <a href="#valuespec">VALUE</a> specifying the HTTP method to
                    use. Standard methods do not need to be enclosed in quotes, while
                    non-standard methods can be specified as quoted strings.
                </p>

                <p>
                    The special method <b>ws</b> creates a valid websocket upgrade
                    GET request, and signals to pathoc to switch to websocket recieve
                    mode if the server responds correctly. Apart from that, websocket
                    requests are just like any other, and all aspects of the request
                    can be over-ridden.
                </p>
            </td>
        </tr>

        <tr>
            <td>h<a href="#valuespec">VALUE</a>=<a href="#valuespec">VALUE</a></td>
            <td>
                Set a header.
            </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.
            </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>u<a href="#valuespec">VALUE</a>
                <br> uSHORTCUT
            </td>

            <td>
                Set a User-Agent header on this request. You can specify either a complete
                <a href="#valuespec">VALUE</a>, or a User-Agent shortcut:

                <table class="table table-condensed">
                    {% for i in uastrings %}
                    <tr>
                        <td><b>{{ i[1] }}</b></td>
                        <td>{{ i[0] }}</td>
                    </tr>
                    {% endfor %}
                </table>
            </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>s<a href="#valuespec">VALUE</a></td>
            <td>
                An embedded Response specification, appended to the path of the request.
            </td>
        </tr>

        <tr>
            <td>x<a href="#valuespec">INTEGER</a></td>
            <td>
                Repeat this message N times.
            </td>
        </tr>

        <tr>
            <td>d<a href="#offsetspec">OFFSET</a></td>
            <td>
                <span class="badge badge-info">HTTP/1 only</span> Disconnect after
                OFFSET bytes.
            </td>
        </tr>

        <tr>
            <td>i<a href="#offsetspec">OFFSET</a>,<a href="#valuespec">VALUE</a></td>
            <td>
                <span class="badge badge-info">HTTP/1 only</span> Inject the specified
                value at the offset.
            </td>
        </tr>

        <tr>
            <td>p<a href="#offsetspec">OFFSET</a>,SECONDS</td>
            <td>
                <span class="badge badge-info">HTTP/1 only</span> Pause for SECONDS
                seconds after OFFSET bytes. SECONDS can be an integer or "f" to pause
                forever.
            </td>
        </tr>
    </tbody>
</table>