rest-assured/src/main/java/io/restassured/config/EncoderConfig.java
public EncoderConfig encodeContentTypeAs(String contentType, ContentType encoder) {
        notNull(contentType, "Content-Type to encode");
        notNull(encoder, ContentType.class);
        Map<String, ContentType> newMap = new HashMap<String, ContentType>(contentEncoders);
        newMap.put(contentType, encoder);
        return new EncoderConfig(defaultContentCharset, defaultQueryParameterCharset, shouldAppendDefaultContentCharsetToContentTypeIfUndefined, newMap, contentTypeToDefaultCharset, true);
    }
public EncoderConfig encodeContentTypeAs(String contentType, ContentType encoder) {
        notNull(contentType, "Content-Type to encode");
        notNull(encoder, ContentType.class);
        Map<String, ContentType> newMap = new HashMap<String, ContentType>(contentEncoders);
        newMap.put(contentType, encoder);
        return new EncoderConfig(defaultContentCharset, defaultQueryParameterCharset, shouldAppendDefaultContentCharsetToContentTypeIfUndefined, newMap, contentTypeToDefaultCharset, true);
    }
Encodes the content (body) of the request specified with the given <code>contentType</code> with the same
encoder used by the supplied <code>encoder</code>. This is useful only if REST Assured picks the wrong
encoder (or can't recognize it) for the given content-type.

@param contentType The content-type to encode with a specific encoder.
@param encoder     The encoder to use for the given content-type.
@return A new {@link EncoderConfig} instance