title: POST JSON over CURL with basic authentication
body: <p>I am using Curl from the command line to debug a small web api I am working on. The web api expects basic authentication and a JSON object as input (POST). Currently this basic authentications works fine:</p>
  
  <pre><code>curl -i --user validuser:70e12a10-83c7-11e0-9d78-0800200c9a65 http://example.com/api.php
  </code></pre>
  
  <p>but I also want to send a JSON object as a POST request:</p>
  
  <pre><code>curl -i --user validuser:70e12a10-83c7-11e0-9d78-0800200c9a65 -X POST -d '{"person":{"name":"bob"}}' http://example.com/api.php
  </code></pre>
  
  <p>I'm getting a 400 Bad Request response with the above command, any ideas on how I bundle a json object in this POST request?</p>