I am trying to store multiple headers in 1 $HEADER shell variable and use it with CURL.
HEADERS="-H \"X-API-KEY: $API_KEY\" -H \"Content-Type: application/json\""
URL="https://myendpoint"
curl -v $HEADERS -X GET $URL
I tried different combination like using "$HEADERS" instead of $HEADERS but it didn't work