Respects the charset from the Content-Type header when capturing HTTP Client request bodies.
Note that it might be possible that the bytes are still not decodeable (e.g. because the content is actually compressed).
In that case we fallback to simply casting the bytes to chars.
Checklist
[x] This is an enhancement of existing features, or a new feature in existing plugins
[ ] ~I have updated CHANGELOG.asciidoc~ Don't think we need a changelog because this feature is not publicly visible yet
[x] I have added tests that prove my fix is effective or that my feature works
[ ] ~Added an API method or config option? Document in which version this will be introduced~
[ ] ~I have made corresponding changes to the documentation~
What does this PR do?
Respects the charset from the
Content-Type
header when capturing HTTP Client request bodies. Note that it might be possible that the bytes are still not decodeable (e.g. because the content is actually compressed). In that case we fallback to simply casting thebytes
tochars
.Checklist