Example #1
0
 /// <summary>
 /// Constructs a new
 /// <see cref="UrlEncodedFormEntity">UrlEncodedFormEntity</see>
 /// with the list
 /// of parameters in the specified encoding.
 /// </summary>
 /// <param name="parameters">iterable collection of name/value pairs</param>
 /// <param name="charset">encoding the name/value pairs be encoded with</param>
 /// <since>4.2</since>
 public UrlEncodedFormEntity(IEnumerable <NameValuePair> parameters, Encoding charset
                             ) : base(URLEncodedUtils.Format(parameters, charset != null ? charset : HTTP.DefContentCharset
                                                             ), ContentType.Create(URLEncodedUtils.ContentType, charset))
 {
 }
Example #2
0
 /// <summary>
 /// Constructs a new
 /// <see cref="UrlEncodedFormEntity">UrlEncodedFormEntity</see>
 /// with the list
 /// of parameters in the specified encoding.
 /// </summary>
 /// <param name="parameters">list of name/value pairs</param>
 /// <param name="charset">encoding the name/value pairs be encoded with</param>
 /// <exception cref="System.IO.UnsupportedEncodingException">if the encoding isn't supported
 ///     </exception>
 public UrlEncodedFormEntity(IList <NameValuePair> parameters, string charset) : base
         (URLEncodedUtils.Format(parameters, charset != null ? charset : HTTP.DefContentCharset
                                 .Name()), ContentType.Create(URLEncodedUtils.ContentType, charset))
 {
 }