updated teamcity_api.sh

pull/2/head
Hari Sekhon 4 years ago
parent 2376acc9d4
commit ced3cf1f82

@ -206,10 +206,10 @@ url_path="${url_path##/}"
# use superuser token override to support teamcity.sh when token has already been created but we cannot get it's key value out of the API, so need to continue using superuser token
if [ -n "${TEAMCITY_SUPERUSER_TOKEN:-}" ]; then
# XXX: superuser token can only be used with blank user which cannot be used with curl_auth.sh
curl -u ":$TEAMCITY_SUPERUSER_TOKEN" "$url_base/$url_path" -H "Accept: application/json" $CURL_OPTS "$@"
curl -u ":$TEAMCITY_SUPERUSER_TOKEN" "$url_base/$url_path" -H "Accept: application/json" -H "Content-Type: application/json" $CURL_OPTS "$@"
else
# XML by default :-/
"$srcdir/curl_auth.sh" "$url_base/$url_path" -H "Accept: application/json" $CURL_OPTS "$@"
"$srcdir/curl_auth.sh" "$url_base/$url_path" -H "Accept: application/json" -H "Content-Type: application/json" $CURL_OPTS "$@"
fi
chmod 0600 "$cookie_jar"

Loading…
Cancel
Save