since ES 5.3, every request without content-type header triggers a warning.
Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
just look at the competition's ticket here: olivere/elastic#511
there is currently no interface available to set the content-type (or other headers),
and no code that sets it.
(with one exception in SetBodyJson(): https://github.com/mattbaird/elastigo/blob/master/lib/request.go#L80 )
(a sub-issue is that the header is not set in SetBodyGzip() even when serializing json: #295 )
an expectation with a go library would be that it should be possible to inject a custom http.Client compatible client, which would allow overriding headers.
since ES 5.3, every request without content-type header triggers a warning.
just look at the competition's ticket here: olivere/elastic#511
there is currently no interface available to set the content-type (or other headers),
and no code that sets it.
(with one exception in
SetBodyJson(): https://github.com/mattbaird/elastigo/blob/master/lib/request.go#L80 )(a sub-issue is that the header is not set in SetBodyGzip() even when serializing json: #295 )
an expectation with a go library would be that it should be possible to inject a custom
http.Clientcompatible client, which would allow overriding headers.