I know I can use
curl --data "param1=value1¶m2=value2" http://hostname/resource
or
curl --request POST https://$url?param1=value1¶m2=value2
But what do I need to do if param1 is value and param2 is a JSON?
It just does not work(tm) if I just toss the JSON in there, even using a variable
$json='{"data":"value"}'
curl --request POST https://$url?param1=value1¶m2=$json
What is the trick here? Note that I HAVE TO make only one call.
Thank you!