How can I set the environment variable in request header for curl?

Googi

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.

1N4001

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.

edited at
0

Comments

0 comments
Login to comment

Related

How can I set runtime variable for docker compose environment variable

How can I set SSE request authorization header?

How do I interpret this header in this curl request?

How can I set a variable to the source of a website in AppleScript without cURL?

How can I check if an environment variable is set in Node.js?

How can I set the helm tiller namespace via an environment variable?

How can I set up the python environment variable on Windows 7?

How can I set .bash_profile environment variable in Dockerfile?

How can I set an environment variable which contains newline characters?

How can I set an environment variable as gulp task?

How can I set up an environment variable to work with TCC?

How can I consistently set an environment variable for a single program?

How can I set a runtime environment variable based on the value of another

How can I set environment variable for another user account in Windows?

how can I await a sparql request and set a variable in a nodejs app?

How do I read a variable created during the flow and set it as a header in the HTTP request component?

Can I set a $_REQUEST variable in PHP?

How can I add a request header with AFNetworking?

How do I set an environment variable?

How to set Apache header only if environment variable has a certain value

In a Postman pre-request-script, how can I read the actual value of a header that uses a variable

cURL - how can I turn into a variable

I can't do a request that needs to set a header with axios

How can I tell a curl request vs browser request

How can I set a header over a RecyclerView?

How can I set indexed value to change the color of each column header and how to set color from API request?

How can I set the environment based on route?

How can I unset an environment variable in Kubernetes?

How can I check the environment variable in meteor