Changeset 731c587 in trunk
- Timestamp:
- 2019-08-09T03:02:44Z (6 years ago)
- Branches:
- master
- Children:
- e7c387a
- Parents:
- d939ed5
- git-author:
- meejah <meejah@…> (2019-08-08 18:45:45)
- git-committer:
- meejah <meejah@…> (2019-08-09 03:02:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified integration/util.py ¶
rd939ed5 r731c587 382 382 383 383 384 def web_get(node_dir, uri_fragment, **kw): 385 """ 386 Make a web-request to the webport of `node_dir`. This will look 387 like: `http://localhost:<webport>/<uri_fragment>` 384 def web_get(node_dir, uri_fragment, **kwargs): 385 """ 386 Make a GET request to the webport of `node_dir`. This will look 387 like: `http://localhost:<webport>/<uri_fragment>`. All `kwargs` 388 are passed on to `requests.get` 388 389 """ 389 390 url = node_url(node_dir, uri_fragment) 390 resp = requests.get(url, **kw )391 resp = requests.get(url, **kwargs) 391 392 _check_status(resp) 392 393 return resp.content 393 394 394 395 395 def web_post(node_dir, uri_fragment, **kw): 396 """ 397 Make a web-request to the webport of `node_dir`. This will look 398 like: `http://localhost:<webport>/<uri_fragment>` 396 def web_post(node_dir, uri_fragment, **kwargs): 397 """ 398 Make a POST request to the webport of `node_dir`. This will look 399 like: `http://localhost:<webport>/<uri_fragment>`. All `kwargs` 400 are passed on to `requests.post` 399 401 """ 400 402 url = node_url(node_dir, uri_fragment) 401 resp = requests.post(url, **kw )403 resp = requests.post(url, **kwargs) 402 404 _check_status(resp) 403 405 return resp.content
Note: See TracChangeset
for help on using the changeset viewer.