re-word docs/args

This commit is contained in:
meejah 2019-08-08 12:45:45 -06:00
parent d939ed5042
commit 731c58754f

View File

@ -381,24 +381,26 @@ def _check_status(response):
) )
def web_get(node_dir, uri_fragment, **kw): def web_get(node_dir, uri_fragment, **kwargs):
""" """
Make a web-request to the webport of `node_dir`. This will look Make a GET request to the webport of `node_dir`. This will look
like: `http://localhost:<webport>/<uri_fragment>` like: `http://localhost:<webport>/<uri_fragment>`. All `kwargs`
are passed on to `requests.get`
""" """
url = node_url(node_dir, uri_fragment) url = node_url(node_dir, uri_fragment)
resp = requests.get(url, **kw) resp = requests.get(url, **kwargs)
_check_status(resp) _check_status(resp)
return resp.content return resp.content
def web_post(node_dir, uri_fragment, **kw): def web_post(node_dir, uri_fragment, **kwargs):
""" """
Make a web-request to the webport of `node_dir`. This will look Make a POST request to the webport of `node_dir`. This will look
like: `http://localhost:<webport>/<uri_fragment>` like: `http://localhost:<webport>/<uri_fragment>`. All `kwargs`
are passed on to `requests.post`
""" """
url = node_url(node_dir, uri_fragment) url = node_url(node_dir, uri_fragment)
resp = requests.post(url, **kw) resp = requests.post(url, **kwargs)
_check_status(resp) _check_status(resp)
return resp.content return resp.content