curl post array code example
Example 1: curl post
curl --data '' https://example.com/resource.cgi
curl -X POST https://example.com/resource.cgi
curl --request POST https://example.com/resource.cgi
Example 2: post json array data curl
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X PUT -d '{"tags":["tag1","tag2"],"question":"Which band?","answers":[{"id":"a0","answer":"Answer1"},{"id":"a1","answer":"answer2"}]}' http://example.com/service`