/** * Constructs a new {@link UrlEncodedFormEntity} with the list * of parameters in the specified encoding. * * @param parameters list of name/value pairs * @param charset encoding the name/value pairs be encoded with * @throws UnsupportedEncodingException if the encoding isn't supported */ public UrlEncodedFormEntityHC4 ( final List <? extends NameValuePair> parameters, final String charset) throws UnsupportedEncodingException { super(URLEncodedUtilsHC4.format(parameters, charset != null ? charset : Charset.forName(HTTP.DEFAULT_CONTENT_CHARSET).name()), ContentType.create(URLEncodedUtilsHC4.CONTENT_TYPE, charset)); }
/** * Constructs a new {@link UrlEncodedFormEntity} with the list * of parameters in the specified encoding. * * @param parameters iterable collection of name/value pairs * @param charset encoding the name/value pairs be encoded with * * @since 4.2 */ public UrlEncodedFormEntityHC4 ( final Iterable <? extends NameValuePair> parameters, final Charset charset) { super(URLEncodedUtilsHC4.format(parameters, charset != null ? charset : Charset.forName(HTTP.DEFAULT_CONTENT_CHARSET)), ContentType.create(URLEncodedUtilsHC4.CONTENT_TYPE, charset)); }