Tweak cURL-based API client.
This commit is contained in:
parent
e9bdcbffcd
commit
57d4239027
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
host="${PM_API_HOST:-localhost:8080}"
|
host="${PM_API_HOST:-localhost:8081}"
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
url="$1"
|
url="$1"
|
||||||
method="GET"
|
method="GET"
|
||||||
@ -19,4 +19,4 @@ curl -s -X "$method" \
|
|||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: $(cat credential)"\
|
-H "Authorization: $(cat credential)"\
|
||||||
"http://${host}/api/$url" \
|
"http://${host}/api/$url" \
|
||||||
-d "$data" | jq .
|
-d "$data"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user