Run curl from .sh script with defined Content-Type Run curl from .sh script with defined Content-Type curl curl

Run curl from .sh script with defined Content-Type


Run the following: (delete the space after Content-Type)

#!/bin/bashCT="Content-Type:application/json"TEST="curl http://127.0.0.1 -H $CT"echo $TESTRESPONSE=`$TEST`echo $RESPONSE


You can try with: bash -c your_bash_file.sh It worked for me with the same problem