Skip to content

Commit

Permalink
Improved doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
0Hughman0 authored Sep 4, 2024
1 parent b73fd26 commit 9fdc074
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pytest_jupyter/jupyter_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,23 @@ def jp_fetch(jp_serverapp, http_server_client, jp_auth_header, jp_base_url):
async def my_test(jp_fetch):
response = await jp_fetch("api", "spec.yaml")
...
With query parameters:
.. code-block:: python
async def my_test(jp_fetch):
response = await jp_fetch("api", "spec.yaml", params={'parameter': 'value'})
...
A POST request with data:
.. code-block:: python
async def my_test(jp_fetch):
response = await jp_fetch("api", "spec.yaml", body=json.dumps({'parameter': 'value'}), method='POST')
...
"""

def client_fetch(*parts, headers=None, params=None, **kwargs):
Expand Down

0 comments on commit 9fdc074

Please sign in to comment.