You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/tools/ngcp-api-post-stdin

17 lines
360 B

#!/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 -