title: What does a 406 (Not Acceptable) error code from elasticsearch mean?
body: <p>I am trying to use <a href="http://dreamysource.io/project/qwest" rel="nofollow noreferrer"><code>qwest</code></a> to send some data to Elasticsearch:</p>
  
  <pre><code>qwest.post(
      'http://elk.example.com:9200/incidents',
      this.incident,
      {cache: true}
  )
      .then(function (xhr, response) {
          console.log('incident posted')
      })
      .catch(function (e, xhr, response) {
          console.log('error posing incident: ' + e)
      })
  </code></pre>
  
  <p>where <code>this.incident</code> is an <code>Object</code> (from Vue.js).</p>
  
  <p>The call fails with a <code>406 (Not Acceptable)</code> error, which I <a href="https://stackoverflow.com/a/14252326/903011">understand</a> being an information from the Elasticsearch server telling me that I wanted an answer in some format, which he cannot use.</p>
  
  <p>The call fails (there is no document indexed) nevertheless, so I am not sure if my understanding is correct?</p>
  
  <p>If so - what is a correct format to ask for?</p>