How do you pass variables in curl command?
Answer
Three ways to pass the environment variables
Answer
Three ways to pass the environment variables
- 1 Add a single quote and a double quote around the variable. $ curl -X POST https://requestbin.io/1bk0un41 -H “Content-Type: application/json” -d ‘{ “property1″:”‘”$TERM”‘”, “property2″:”value2” }’ …
- 2 Escaping double quote. …
- 3 Use a data generation function.