mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 19:26:44 +00:00
re-word docs/args
This commit is contained in:
parent
d939ed5042
commit
731c58754f
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user