Package org.apache.http.client.entity
Class UrlEncodedFormEntity
- java.lang.Object
-
- org.apache.http.entity.AbstractHttpEntity
-
- org.apache.http.entity.StringEntity
-
- org.apache.http.client.entity.UrlEncodedFormEntity
-
- All Implemented Interfaces:
java.lang.Cloneable,HttpEntity
public class UrlEncodedFormEntity extends StringEntity
An entity composed of a list of url-encoded pairs. This is typically useful while sending an HTTP POST request.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description UrlEncodedFormEntity(java.lang.Iterable<? extends NameValuePair> parameters)Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofHTTP.DEFAULT_CONTENT_CHARSETUrlEncodedFormEntity(java.lang.Iterable<? extends NameValuePair> parameters, java.nio.charset.Charset charset)Constructs a newUrlEncodedFormEntitywith the list of parameters in the specified encoding.UrlEncodedFormEntity(java.util.List<? extends NameValuePair> parameters)Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofHTTP.DEFAULT_CONTENT_CHARSETUrlEncodedFormEntity(java.util.List<? extends NameValuePair> parameters, java.lang.String charset)Constructs a newUrlEncodedFormEntitywith the list of parameters in the specified encoding.
-
Method Summary
-
Methods inherited from class org.apache.http.entity.StringEntity
clone, getContent, getContentLength, isRepeatable, isStreaming, writeTo
-
Methods inherited from class org.apache.http.entity.AbstractHttpEntity
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType, toString
-
-
-
-
Constructor Detail
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.util.List<? extends NameValuePair> parameters, java.lang.String charset) throws java.io.UnsupportedEncodingException
Constructs a newUrlEncodedFormEntitywith the list of parameters in the specified encoding.- Parameters:
parameters- list of name/value pairscharset- encoding the name/value pairs be encoded with- Throws:
java.io.UnsupportedEncodingException- if the encoding isn't supported
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.lang.Iterable<? extends NameValuePair> parameters, java.nio.charset.Charset charset)
Constructs a newUrlEncodedFormEntitywith the list of parameters in the specified encoding.- Parameters:
parameters- iterable collection of name/value pairscharset- encoding the name/value pairs be encoded with- Since:
- 4.2
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.util.List<? extends NameValuePair> parameters) throws java.io.UnsupportedEncodingException
Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofHTTP.DEFAULT_CONTENT_CHARSET- Parameters:
parameters- list of name/value pairs- Throws:
java.io.UnsupportedEncodingException- if the default encoding isn't supported
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.lang.Iterable<? extends NameValuePair> parameters)
Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofHTTP.DEFAULT_CONTENT_CHARSET- Parameters:
parameters- iterable collection of name/value pairs- Since:
- 4.2
-
-