Top Description Constructors Methods
org.apache.hc.client5.http.entity

public Class UrlEncodedFormEntity

extends StringEntity
Class Inheritance
Imports
java.nio.charset.Charset, java.util.List, org.apache.hc.core5.http.ContentType, .NameValuePair, org.apache.hc.core5.http.io.entity.StringEntity, org.apache.hc.core5.net.WWWFormCodec

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

AccessConstructor and Description
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 ContentType#APPLICATION_FORM_URLENCODED

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 ContentType#APPLICATION_FORM_URLENCODED

Method Summary

Inherited from org.apache.hc.core5.http.io.entity.StringEntity:
closegetContentgetContentLengthisRepeatableisStreamingwriteTo

Constructor Detail

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)

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType#APPLICATION_FORM_URLENCODED

Parameters
parameters:List<? extends NameValuePair>

list of name/value pairs

UrlEncodedFormEntityback to summary
public UrlEncodedFormEntity(final Iterable<? extends NameValuePair> parameters)

Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType#APPLICATION_FORM_URLENCODED

Parameters
parameters:Iterable<? extends NameValuePair>

iterable collection of name/value pairs

Since
4.2