title: 400 error message when trying to create a new document in CouchDb using XMLHttpRequest
body: <p>I am trying to create a new document in a couchDB database but with the following code I get a '400 bad request' response. I want to create a document that does not contain any other information than the _id (and of course the generated _rev).</p>
  
  <pre><code>            var xhrCreate = new XMLHttpRequest();
              xhrCreate.open('PUT','http://domainName:5984/dbName/docName/', true);
              xhrCreate.setRequestHeader("Content-type", "application/json");
              xhrCreate.send();
  </code></pre>
  
  <p>The CouchDb documentation says that a 400 error indicates a: </p>
  
  <p>"Bad request structure. The error can indicate an error with the request URL, path or headers. Differences in the supplied MD5 hash and content also trigger this error, as this may indicate message corruption."</p>
  
  <p>Could anyone point me in the right direction? Hints and help is much appreciated.</p>