Rev | Line | |
---|
[158] | 1 | .. _api-zoo-request: |
---|
| 2 | |
---|
| 3 | ZOO.Request |
---|
| 4 | =========== |
---|
| 5 | |
---|
| 6 | Contains convenience methods for working with ZOORequest which replace XMLHttpRequest. |
---|
| 7 | |
---|
| 8 | Functions |
---|
| 9 | --------- |
---|
| 10 | |
---|
| 11 | .. list-table:: |
---|
| 12 | :widths: 30 50 |
---|
| 13 | :header-rows: 1 |
---|
| 14 | |
---|
| 15 | * - NAME |
---|
| 16 | - DESCRIPTION |
---|
| 17 | * - :ref:`GET <GET>` |
---|
| 18 | - Send an HTTP GET request. |
---|
| 19 | * - :ref:`POST <POST>` |
---|
| 20 | - Send an HTTP POST request. |
---|
| 21 | |
---|
| 22 | .. _GET: |
---|
| 23 | |
---|
| 24 | GET |
---|
| 25 | Send an HTTP GET request. |
---|
| 26 | |
---|
[178] | 27 | *Parameters* |
---|
| 28 | |
---|
| 29 | | ``url {String}`` The URL to request. |
---|
| 30 | | ``params {Object}`` Params to add to the url |
---|
| 31 | |
---|
| 32 | *Returns* |
---|
| 33 | |
---|
| 34 | ``{String}`` Request result. |
---|
| 35 | |
---|
[158] | 36 | .. _POST: |
---|
| 37 | |
---|
| 38 | POST |
---|
[178] | 39 | Send an HTTP POST request. |
---|
| 40 | |
---|
| 41 | *Parameters* |
---|
| 42 | |
---|
| 43 | | ``url {String}`` The URL to request. |
---|
[180] | 44 | | ``body {String}`` The request's body to send. |
---|
| 45 | | ``headers {Object}`` A key-value object of headers to push to the request's head |
---|
[178] | 46 | |
---|
| 47 | *Returns* |
---|
| 48 | |
---|
| 49 | ``{String}`` Request result. |
---|
Note: See
TracBrowser
for help on using the repository browser.