How do I use POST with Ansbile
curl -k -X POST -H "Accept:application/json" -H "Content-Type:application/json"-u user:A231212123432 "https://www.example.com"
Request Body
{
"a":"1"
"b":"2"
"c":"3"
}
According to the docs it would work like this:
- url: https://www.example.com
method: POST
user: user
password: A231212123432
HEADER_Content-Type: "application/json"
body: '{ "a":"1" "b":"2" "c":"3" }'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.