title: {"error":"Content-Type header [] is not supported","status":406} When Inserting Data to Elasticsearch with Golang
body: <p>Does anyone know how to fix this error? </p>
  
  <p>I use Golang to insert data into elasticsearch, but it seems that there is no data inserted because of this error. </p>
  
  <blockquote>
    <p>{"error":"Content-Type header [] is not supported","status":406}</p>
  </blockquote>
  
  <p>I already set the content type. Note that I use elasticsearch 6.4.3 </p>
  
  <pre><code>request, err := http.NewRequest("POST", urlSearch, bytes.NewBuffer(query))
              request.Close = true
              request.Header.Set("Content-Type", "application/json")
  </code></pre>
  
  <p>Last but not least, I use elastigo package to make requests to elasticsearch. </p>