Skip to content

Commit

Permalink
curl example added
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Oct 4, 2017
1 parent e52501b commit 06f7089
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions docs/source/pywps/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,32 @@ Start by trying the *GetCapabilities* request:

.. code-block:: bash
$ wget -q -O - "http://127.0.0.1:5000/wps?service=WPS&request=GetCapabilities"
$ wget -q -O caps.xml \
"http://127.0.0.1:5000/wps?service=WPS&request=GetCapabilities"
Important question: Why ``-q``, ``-O -`` and ``"`` in the comnand:
Important question: Why ``-q``, ``-O`` and ``"`` in the comnand:

``-q``
quit verbose information about requests.
``-O -``
Output to file, but since the file is ``-`` the content will be dumped into the prompt.
``-O``
Output to file. You can use ``-``, and the content will be dumped into the prompt.
``"``
Otherwise wget would not consider ``&`` as part of the URL and would cut it.

curl
----

.. todo::
Add curl example
Similar to *wget* you can also use *curl* to retrieve the *GetCapabilities* XML document:

.. code-block:: bash
$ curl -s -o caps.xml \
"http://127.0.0.1:5000/wps?service=WPS&request=GetCapabilities"
``-s``
silent mode ... no progress bar.
``-o``
Output to file. You can use ``-``, and the content will be dumped into the prompt.

XML Request using RESTClient
----------------------------
Expand Down Expand Up @@ -115,7 +124,7 @@ In case of Python errors in the called process, PyWPS will dump the Python stack
Exercise
--------

Try ``wget`` with some of the previouse *DescribeProcess* and *Execute* requests.
Try ``wget`` or ``curl`` with some of the previouse *DescribeProcess* and *Execute* requests.

Links
-----
Expand Down

0 comments on commit 06f7089

Please sign in to comment.