title: How to pass payload via JSON file for curl?
body: <p>I can successfully create a place via <code>curl</code> executing the following command:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ curl -vX POST https://server/api/v1/places.json -d "
    auth_token=B8dsbz4HExMskqUa6Qhn&amp; \
    place[name]=Fuelstation Central&amp; \
    place[city]=Grossbeeren&amp; \
    place[address]=Buschweg 1&amp; \
    place[latitude]=52.3601&amp; \
    place[longitude]=13.3332&amp; \
    place[washing]=true&amp; \
    place[founded_at_year]=2000&amp; \
    place[products][]=diesel&amp; \
    place[products][]=benzin \
  "
  </code></pre>
  
  <p>The server returns <code>HTTP/1.1 201 Created</code>.<br>
  Now I want to store the payload in a JSON file which looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>// testplace.json
  {
    "auth_token" : "B8dsbz4HExMskqUa6Qhn",
    "name" : "Fuelstation Central",
    "city" : "Grossbeeren",
    "address" : "Buschweg 1",
    "latitude" : 52.3601,
    "longitude" : 13.3332,
    "washing" : true,
    "founded_at_year" : 2000,
    "products" : ["diesel","benzin"]
  }
  </code></pre>
  
  <p>So I modify the command to be executed like this:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ curl -vX POST http://server/api/v1/places.json -d @testplace.json
  </code></pre>
  
  <p>This fails returning <code>HTTP/1.1 401 Unauthorized</code>. Why?</p>