title: curl works, but won't execute in BASH script
body: <p>The following curl command works from the command line.  I get a valid response from the server.</p>
  
  <pre><code>curl -X POST https://somebaseurl/api/v1/auth/login -H "Content-Type:application/json" -d '{"email": "foo@bar,com", "password": "foo"}'
  </code></pre>
  
  <p>However I am trying to write a BASH script like this</p>
  
  <pre><code>baseUrl=https://somebaseurl
  contentTypeJson="\"Content-Type:application/json\""
  credentials="'{\"email\": \"foo@bar.com",\"password\": \"foo\"}'"
  login="curl -X POST $baseUrl/api/v1/auth/login -H $contentTypeJson -d $credentials"
   echo ${login}
  
  response=`${login}`
  echo ${response}
  </code></pre>
  
  <p>I get a bad request response from the server.  However if I copy the echoed curl command directly into my terminal it works.  What am I doing wrong?</p>
  
  <p>edit:</p>
  
  <p>As requested I get 
     Bad Request For request 'POST api/v1/auth/login' [Expected application/json]</p>