Top Description Fields Constructors Methods
org.apache.http.client.entity

public Class UrlEncodedFormEntity

extends StringEntity
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.nio.charset.Charset, java.util.List, org.apache.http.NameValuePair, org.apache.http.client.utils.URLEncodedUtils, org.apache.http.entity.ContentType, .StringEntity, org.apache.http.protocol.HTTP

An entity composed of a list of url-encoded pairs. This is typically useful while sending an HTTP POST request.
Since
4.0

Field Summary

Inherited from org.apache.http.entity.StringEntity:
content

Constructor Summary

AccessConstructor and Description
public
UrlEncodedFormEntity(final List<? extends NameValuePair>
list of name/value pairs
parameters
,
final String
encoding the name/value pairs be encoded with
charset
)

Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.

public
UrlEncodedFormEntity(final Iterable<? extends NameValuePair>
iterable collection of name/value pairs
parameters
,
final Charset
encoding the name/value pairs be encoded with
charset
)

Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.

public
UrlEncodedFormEntity(final List<? extends NameValuePair>
list of name/value pairs
parameters
)

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of HTTP#DEFAULT_CONTENT_CHARSET

public
UrlEncodedFormEntity(final Iterable<? extends NameValuePair>
iterable collection of name/value pairs
parameters
)

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of HTTP#DEFAULT_CONTENT_CHARSET

Method Summary

Inherited from org.apache.http.entity.StringEntity:
clonegetContentgetContentLengthisRepeatableisStreamingwriteTo

Constructor Detail

UrlEncodedFormEntityback to summary
public UrlEncodedFormEntity(final List<? extends NameValuePair> parameters, final String charset) throws UnsupportedEncodingException

Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.

Parameters
parameters:List<? extends NameValuePair>

list of name/value pairs

charset:String

encoding the name/value pairs be encoded with

Exceptions
UnsupportedEncodingException:
if the encoding isn't supported
UrlEncodedFormEntityback to summary
public UrlEncodedFormEntity(final Iterable<? extends NameValuePair> parameters, final Charset charset)

Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.

Parameters
parameters:Iterable<? extends NameValuePair>

iterable collection of name/value pairs

charset:Charset

encoding the name/value pairs be encoded with

Since
4.2
UrlEncodedFormEntityback to summary
public UrlEncodedFormEntity(final List<? extends NameValuePair> parameters) throws UnsupportedEncodingException

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of HTTP#DEFAULT_CONTENT_CHARSET

Parameters
parameters:List<? extends NameValuePair>

list of name/value pairs

Exceptions
UnsupportedEncodingException:
if the default encoding isn't supported
UrlEncodedFormEntityback to summary
public UrlEncodedFormEntity(final Iterable<? extends NameValuePair> parameters)

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of HTTP#DEFAULT_CONTENT_CHARSET

Parameters
parameters:Iterable<? extends NameValuePair>

iterable collection of name/value pairs

Since
4.2