I found a lot of examples on how to use simple POST commands in cURL, but I didn't find examples on how to send full HTTP POST commands, which contain:
- Headers (Basic Authentication)
- HTTP Params (
s=1&r=33
) - Body Data, some XML string
All I found is:
echo "this is body" | curl -d "ss=ss&qq=11" http://localhost/
That doesn't work, and it sends the HTTP parameters as the body.
Best Answer
Not enough reputation to comment so leave this as an answer hoping it help.
This is what I used for a S3 bucket acl put operation. Headers are in -H and body which is a xml file is in ${aclfile} following -T. You can see that from the output:
if url params contain special signs like "+", use --data-urlencode for every param (containing special signs) of them: