Class UrlEncodedFormEntity
- java.lang.Object
-
- org.apache.hc.core5.http.io.entity.AbstractHttpEntity
-
- org.apache.hc.core5.http.io.entity.StringEntity
-
- org.apache.hc.client5.http.entity.UrlEncodedFormEntity
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.http.EntityDetails,org.apache.hc.core5.http.HttpEntity
public class UrlEncodedFormEntity extends org.apache.hc.core5.http.io.entity.StringEntityAn 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 org.apache.hc.core5.http.NameValuePair> parameters)Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofContentType.APPLICATION_FORM_URLENCODEDUrlEncodedFormEntity(java.lang.Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters, java.nio.charset.Charset charset)Constructs a newUrlEncodedFormEntitywith the list of parameters in the specified encoding.UrlEncodedFormEntity(java.util.List<? extends org.apache.hc.core5.http.NameValuePair> parameters)Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofContentType.APPLICATION_FORM_URLENCODED
-
Method Summary
-
Methods inherited from class org.apache.hc.core5.http.io.entity.StringEntity
close, getContent, getContentLength, isRepeatable, isStreaming, writeTo
-
-
-
-
Constructor Detail
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.lang.Iterable<? extends org.apache.hc.core5.http.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 org.apache.hc.core5.http.NameValuePair> parameters)
Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofContentType.APPLICATION_FORM_URLENCODED- Parameters:
parameters- list of name/value pairs
-
UrlEncodedFormEntity
public UrlEncodedFormEntity(java.lang.Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters)
Constructs a newUrlEncodedFormEntitywith the list of parameters with the default encoding ofContentType.APPLICATION_FORM_URLENCODED- Parameters:
parameters- iterable collection of name/value pairs- Since:
- 4.2
-
-