@Override
  @SuppressWarnings("unchecked")
  public void encode(Object object, Type bodyType, RequestTemplate template)
      throws EncodeException {
    String contentTypeValue = getContentTypeValue(template.headers());
    val contentType = ContentType.of(contentTypeValue);
    if (processors.containsKey(contentType) == false) {
      delegate.encode(object, bodyType, template);
      return;
    }

    Map<String, Object> data;
    if (object instanceof Map) {
      data = (Map<String, Object>) object;
    } else if (isUserPojo(bodyType)) {
      data = toMap(object);
    } else {
      delegate.encode(object, bodyType, template);
      return;
    }

    val charset = getCharset(contentTypeValue);
    processors.get(contentType).process(template, charset, data);
  }
Constructor with specified delegate encoder.

@param delegate delegate encoder, if this encoder couldn't encode object.
form/src/main/java/feign/form/FormEncoder.java