Needs refactoring to put common stuff into one place, and source it from there.gjungwirth/voicemail_number
parent
25c9d9f3e1
commit
4163e840e9
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 <url>";
|
||||
exit;
|
||||
}
|
||||
|
||||
URL="$1"
|
||||
test -z "$URL" && usage;
|
||||
test -z "$APIUSER" && APIUSER="administrator:administrator"
|
||||
|
||||
HEADERS="-H 'Connection: close'"
|
||||
|
||||
curl -i -X DELETE "$HEADERS" --user "$APIUSER" --insecure "$URL"
|
||||
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 <url>";
|
||||
exit;
|
||||
}
|
||||
|
||||
URL="$1"
|
||||
test -z "$URL" && usage;
|
||||
test -z "$APIUSER" && APIUSER="administrator:administrator"
|
||||
|
||||
HEADERS="-H 'Connection: close'"
|
||||
|
||||
curl -i -X GET "$HEADERS" --user "$APIUSER" --insecure "$URL"
|
||||
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 <url>";
|
||||
exit;
|
||||
}
|
||||
|
||||
URL="$1"
|
||||
test -z "$URL" && usage;
|
||||
CTYPE="application/json-patch+json"
|
||||
test -z "$APIUSER" && APIUSER="administrator:administrator"
|
||||
|
||||
curl -i -X PATCH \
|
||||
-H 'Connection: close' -H 'Prefer: return=representation' -H "Content-Type: $CTYPE" \
|
||||
--user "$APIUSER" --insecure "$URL" -T -
|
||||
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 <url> <content-type>";
|
||||
exit;
|
||||
}
|
||||
|
||||
URL="$1"
|
||||
test -z "$URL" && usage;
|
||||
CTYPE="$2"
|
||||
test -z "$CTYPE" && usage;
|
||||
test -z "$APIUSER" && APIUSER="administrator:administrator"
|
||||
|
||||
curl -i -X POST \
|
||||
-H 'Connection: close' -H 'Prefer: return=representation' -H "Content-Type: $CTYPE" \
|
||||
--user "$APIUSER" --insecure "$URL" -T -
|
||||
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 <url> <content-type>";
|
||||
exit;
|
||||
}
|
||||
|
||||
URL="$1"
|
||||
test -z "$URL" && usage;
|
||||
CTYPE="$2"
|
||||
test -z "$CTYPE" && usage;
|
||||
test -z "$APIUSER" && APIUSER="administrator:administrator"
|
||||
|
||||
curl -i -X PUT \
|
||||
-H 'Connection: close' -H 'Prefer: return=representation' -H "Content-Type: $CTYPE" \
|
||||
--user "$APIUSER" --insecure "$URL" -T -
|
||||
Loading…
Reference in new issue