How can I use curl and/or bash to post a file, substituting env variables.
Lets say I have test.json like so (which I can edit the format of):
{
"name": "'"$NAME_VAR"'"
}
how can I post this file via curl, while substituting any env variable?
Example curl of posting a test.json file without substitutions:
curl -X POST -H 'Content-Type: application/json' --data-binary @test.json http://test-server/some/path