Wednesday, 13 July 2016

How to include environment variable in CURL?

When you post a string(json) by curl and you want to include your environment variables in to the string like this:
   "username": "$HOST_NAME".
What you expect to see is username = "Peter MacAir" on your server side.

But it shows this username=$HOST_NAME on your server side



'payload={"channel": "#testgroup",
"username": "'"$HOST_NAME"'",
"text": "'"$APK_NAME"' is ready."}'

No comments:

Post a comment