Following org.springframework.http.MediaType deprecation messages, I now use media types without encoding suffixes but ... my request now miss content encoding info.
Shouldn't org.springframework.http.converter.AbstractHttpMessageConverter
set Content-Encoding
header, for instance in addDefaultHeaders
method, when it sets Content-Type
?
Comment From: ch4mpy
It should do what I expect by appending the charset to content-type. For some reason, in my case, defaultCharset is null and nothing happens.
I worked around my issue by always providing a content-type with charset (new MediaType(contentType, charset))