Skip to content
Snippets Groups Projects
Commit 95abef31 authored by Steve Crouch's avatar Steve Crouch
Browse files

Add command needed to run the Python example

parent 45febe76
No related branches found
No related tags found
No related merge requests found
...@@ -83,7 +83,7 @@ Then we should see something like the following (although without the formatting ...@@ -83,7 +83,7 @@ Then we should see something like the following (although without the formatting
Using Python Using Python
~~~~~~~~~~~~ ~~~~~~~~~~~~
We can duplicate the cURL request above in Python like this: We can duplicate the cURL request above in Python 3. Creating a new Python file (e.g. *api-test.py*) with the following contents:
.. code-block:: python .. code-block:: python
...@@ -97,6 +97,12 @@ We can duplicate the cURL request above in Python like this: ...@@ -97,6 +97,12 @@ We can duplicate the cURL request above in Python like this:
response = requests.get(url, headers=headers) response = requests.get(url, headers=headers)
print(response) print(response)
We can run this example using:
.. code-block:: console
$ python api-test.py
Which should display the same output as we saw with cURL. Which should display the same output as we saw with cURL.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment