@Override
  public void process(RequestTemplate template, Charset charset, Map<String, Object> data)
      throws EncodeException {
    val bodyData = new StringBuilder();
    for (Entry<String, Object> entry : data.entrySet()) {
      if (entry == null || entry.getKey() == null) {
        continue;
      }
      if (bodyData.length() > 0) {
        bodyData.append(QUERY_DELIMITER);
      }
      bodyData.append(createKeyValuePair(entry, charset));
    }

    val contentTypeValue =
        new StringBuilder()
            .append(getSupportedContentType().getHeader())
            .append("; charset=")
            .append(charset.name())
            .toString();

    val bytes = bodyData.toString().getBytes(charset);

    template.header(CONTENT_TYPE_HEADER, Collections.<String>emptyList()); // reset header
    template.header(CONTENT_TYPE_HEADER, contentTypeValue);
    template.body(bytes, charset);
  }
An URL encoded form content processor.

@author Artem Labazin
form/src/main/java/feign/form/UrlencodedFormContentProcessor.java