How can I set the environment variable in request header for curl
curl --location --request POST 'test.example.com' \
--header 'Content-Type: application/json' \
--header 'access_token: "${SOME_ENV_TOKEN}"' \
--header 'Authorization: Basic Og=='
Not working.
Use --header "access_token: \"${SOME_ENV_TOKEN}\""
The '
quotes disable variable expansion in sh.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments