#!/bin/bash ENV_VAR=foo set -x curl -u {user}: -X POST --header 'Content-Type: application/json' -d '{"my-var": " '"$ENV_VAR"' "}' https://url &>/dev/null
Standard input is empty
Standard output is empty
+ curl -u '{user}:' -X POST --header 'Content-Type: application/json' -d '{"my-var": " foo "}' https://url