org.apache.hc.client5.http.entity

## Class UrlEncodedFormEntity

- java.lang.Object
- - org.apache.hc.core5.http.entity.AbstractImmutableHttpEntity
  - - org.apache.hc.core5.http.entity.AbstractHttpEntity
    - - org.apache.hc.core5.http.entity.StringEntity
      - - org.apache.hc.client5.http.entity.UrlEncodedFormEntity

All Implemented Interfaces:
  org.apache.hc.core5.http.entity.HttpContentProducer, org.apache.hc.core5.http.HttpEntity

    @NotThreadSafe
    public class UrlEncodedFormEntity
    extends org.apache.hc.core5.http.entity.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 and Description
`UrlEncodedFormEntity(Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters)` Constructs a new `UrlEncodedFormEntity` with the list of parameters with the default encoding of `StandardCharsets.ISO_8859_1`
`UrlEncodedFormEntity(Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters, Charset charset)` Constructs a new `UrlEncodedFormEntity` with the list of parameters in the specified encoding.
`UrlEncodedFormEntity(List<? extends org.apache.hc.core5.http.NameValuePair> parameters)` Constructs a new `UrlEncodedFormEntity` with the list of parameters with the default encoding of `StandardCharsets.ISO_8859_1`

### Method Summary

### Methods inherited from class org.apache.hc.core5.http.entity.StringEntity

`getContent, getContentLength, isRepeatable, isStreaming, writeTo`

### Methods inherited from class org.apache.hc.core5.http.entity.AbstractHttpEntity

`getContentEncoding, getContentType, getTrailerNames, getTrailers, isChunked, setChunked, setContentEncoding, setContentType`

### Methods inherited from class org.apache.hc.core5.http.entity.AbstractImmutableHttpEntity

`toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### UrlEncodedFormEntity

    public UrlEncodedFormEntity(Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters,
                        Charset charset)

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

Parameters:
  `parameters` - iterable collection of name/value pairs
  `charset` - encoding the name/value pairs be encoded with
Since:
  4.2

#### UrlEncodedFormEntity

    public UrlEncodedFormEntity(List<? extends org.apache.hc.core5.http.NameValuePair> parameters)

Constructs a new `UrlEncodedFormEntity` with the list of parameters with the default encoding of `StandardCharsets.ISO_8859_1`

Parameters:
  `parameters` - list of name/value pairs

#### UrlEncodedFormEntity

    public UrlEncodedFormEntity(Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters)

Constructs a new `UrlEncodedFormEntity` with the list of parameters with the default encoding of `StandardCharsets.ISO_8859_1`

Parameters:
  `parameters` - iterable collection of name/value pairs
Since:
  4.2