how I do post multiple values to the same key using cURL?
for example when I ran the following to my example.com URL, it complained...is the format correct or is this a problem with the backend not being able to handle the request?
curl -k -H 'Accept: application/json' --user admin:admin example.com -d name=peter -d name=paul -d name=mary
Multiple
-d
looks fine. The docs said-d name=daniel -d skill=lousy
will generatename=daniel&skill=lousy
http://curl.haxx.se/docs/manpage.html#-d
So if you want send an array, you have to use the
[]
brackets.It looks like you can also use