ok2c / httpcomponents-jackson

JSON message asynchronous producers and consumers for Apache HttpComponents 5.0 based on Jackson JSON library
https://ok2c.github.io/httpcomponents-jackson
Apache License 2.0
7 stars 6 forks source link

Make Content-Type header control configurable #13

Closed mattirn closed 1 year ago

mattirn commented 1 year ago

@ok2c, thanks for the hc5-async-json lib! I'm in an unfortunate situation where servers I had to use erroneously set response header Content-Type: text/html even thought their response is perfect JSON. In hc5-async-json code there are controls for correct Content-Type header and thus I cannot use it as it is. Do I have other options than clone the httpcomponents-jackson and modify the code? Would be great if Content-Type header control is made configurable (on/off).

ok2c commented 1 year ago

@mattirn I do not see a problem with making it configurable, however a better solution might be rewriting the response Content-Type header with a response interceptor.