httpbuilder icon indicating copy to clipboard operation
httpbuilder copied to clipboard

Use charset from request content-type for body encoding if present

Open tl1 opened this issue 10 years ago • 0 comments

When using HTTPBuilder with grails-rest-plugin on a platform with default encoding set to US-ASCII we realized that by default HTTPBuilder will use the platform's default encoding to encode request bodies if not explicitly set to a different value by calling EncoderRegistry.setCharset(...). Especially setting the charset on the request content-type (e. g. application/json; charset=UTF-8) did not change this behaviour.

It would be very convenient and also consistent in my opinion to use the charset from the request content-type for body encoding if present.

tl1 avatar Apr 01 '14 10:04 tl1