code: public static String encodeParameters(RequestConfig config, Heroku.RequestKey... keys) {
  
          StringBuilder encodedParameters = new StringBuilder();
          String separator = "";
          for (Heroku.RequestKey key : keys) {
              if (config.get(key) != null) {
                  encodedParameters.append(separator);
                  encodedParameters.append(urlencode(key.queryParameter, ENCODE_FAIL));
                  encodedParameters.append("=");
                  encodedParameters.append(urlencode(config.get(key), ENCODE_FAIL));
                  separator = "&";
              }
          }
          return new String(encodedParameters);
  
      }
docs: URL encode request paramaters from a {@link RequestConfig}.
  @param config Name/value pairs for a HTTP request.
  @param keys List of keys in the config to encode.
  @return A string representation of encoded name/value parameters.