I want to send this string inside a CURL request from shell script :
"google-site-verification=O_Kd7lqvCvpBz7fzEeUKGVKBmsAsfJgaJuh3PZRnrsk"
To do that I'm using this script :
OVH_HTTP_METHOD="POST"
OVH_HTTP_QUERY="$OVH_API_URL/$OVH_API_END_POINT_DOMAIN_ZONE_DNS/domain.com/$OVH_API_END_POINT_DOMAIN_ZONE_DNS_RECORD"
OVH_FIELD_TYPE="TXT"
OVH_SUB_DOMAIN=""
OVH_TARGET=""google-site-verification=O_Kd7lqvCvpBz7fzEeUKGVKBmsAsfJgaJuh3PZRnrsk""
OVH_HTTP_BODY="{"fieldType":"$OVH_FIELD_TYPE","subDomain":"$OVH_SUB_DOMAIN","target":"$OVH_TARGET"}"
curl -X $OVH_HTTP_METHOD
$OVH_HTTP_QUERY
-H "Content-Type: application/json"
-H "X-Ovh-Application: $OVH_API_APPLICATION_KEY"
-H "X-Ovh-Timestamp: $OVH_TIME"
-H "X-Ovh-Signature: $OVH_SIG"
-H "X-Ovh-Consumer: $OVH_API_CONSUMER_KEY"
--data "$OVH_HTTP_BODY"
But I get systematically this error message :
{"message":"Invalid JSON received","httpCode":"400 Bad Request","errorCode":"INVALID_JSON"}
UPDATE with curl -v :
Do you have any idea to solve that?
Thanks
L.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…