private String createKeyValuePairFromArray(String key, Object values, Charset charset) {
    val result = new StringBuilder();
    val array = (Object[]) values;

    for (int index = 0; index < array.length; index++) {
      val value = array[index];
      if (value == null) {
        continue;
      }

      if (index > 0) {
        result.append(QUERY_DELIMITER);
      }

      result.append(key).append(EQUAL_SIGN).append(encode(value, charset));
    }
    return result.toString();
  }
An URL encoded form content processor.

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