Class 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.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 org.apache.hc.core5.http.NameValuePair> parameters)
      Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType.APPLICATION_FORM_URLENCODED
      UrlEncodedFormEntity​(java.lang.Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters, java.nio.charset.Charset charset)
      Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.
      UrlEncodedFormEntity​(java.util.List<? extends org.apache.hc.core5.http.NameValuePair> parameters)
      Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType.APPLICATION_FORM_URLENCODED
    • Method Summary

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

        close, getContent, getContentLength, isRepeatable, isStreaming, writeTo
      • Methods inherited from class org.apache.hc.core5.http.io.entity.AbstractHttpEntity

        getContentEncoding, getContentType, getTrailerNames, getTrailers, isChunked, toString, writeTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UrlEncodedFormEntity

        public UrlEncodedFormEntity​(java.lang.Iterable<? extends org.apache.hc.core5.http.NameValuePair> parameters,
                                    java.nio.charset.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​(java.util.List<? extends org.apache.hc.core5.http.NameValuePair> parameters)
        Constructs a new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType.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 new UrlEncodedFormEntity with the list of parameters with the default encoding of ContentType.APPLICATION_FORM_URLENCODED
        Parameters:
        parameters - iterable collection of name/value pairs
        Since:
        4.2