@ NonNull private String determineEncoding ( HttpRequest request ) { MediaType mimeType = request . getContentType ( ) ; if ( mimeType == null ) return Charsets . UTF_8 . name ( ) ; Charset charset = mimeType . getCharset ( ) ; return charset == null ? Charsets . UTF_8 . name ( ) : charset . name ( ) ; }
Determine the encoding for the given request .