Skip to content

Commit 91d1840

Browse files
committed
fix(httpclient): add example
Signed-off-by: Chris Snow <[email protected]>
1 parent c14cd95 commit 91d1840

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hpecp/cli/httpclient.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ def get(
4545
Examples
4646
--------
4747
$ hpecp httpclient get /api/v1/workers
48-
"""
48+
> some output
49+
50+
$ hpecp httpclient get /api/v2/tag | python3 -c \
51+
'import json,sys;obj=json.load(sys.stdin);[ print(t["_links"]["self"]["href"]) for t in obj["_embedded"]["tags"] if t["label"]["name"] == "Datafabric"]'
52+
/api/v2/tag/1
53+
""" # noqa: E501
4954
response = base.get_client()._request(
5055
url,
5156
http_method="get",

0 commit comments

Comments
 (0)