we are seeing lots of:
[WARN][RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
from elasticsearch.
it is probably a general issue that the header is not added, especially for non-json payloads,
but spefically the code for gzip compression, as introduced here:
https://github.com/mattbaird/elastigo/pull/263/files
omits setting the Content-Type header.
unlike the pre-existing SetBodyJson(), the newly added SetBodyGzip() is missing the logic for setting that header.
a quick solution should be to add the header when generating json, as in SetBodyJson():
we are seeing lots of:
[WARN][RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
from elasticsearch.it is probably a general issue that the header is not added, especially for non-json payloads,
but spefically the code for gzip compression, as introduced here: https://github.com/mattbaird/elastigo/pull/263/files omits setting the Content-Type header. unlike the pre-existing
SetBodyJson()
, the newly addedSetBodyGzip()
is missing the logic for setting that header. a quick solution should be to add the header when generating json, as inSetBodyJson()
: