Merge pull request #17 from bonidier/ovhapilib/add-put-data

ovhapilib bugfix: JSON datas must be set when PUT method is used
master
Didier BONNEFOI 2018-09-26 19:47:04 +02:00 committed by GitHub
commit 9aecbca3d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ OvhRequestApi()
cmd+=(--target "${OVHAPI_TARGET}") cmd+=(--target "${OVHAPI_TARGET}")
fi fi
if [ "${method}" == "POST" ]; then if [ "${method}" == "POST" ] || [ "${method}" == "PUT" ]; then
# double-quote data content for bash input # double-quote data content for bash input
data=$(printf "%q" "${data}") data=$(printf "%q" "${data}")
cmd+=(--data "${data}") cmd+=(--data "${data}")