Class NameValuePairs


  • public class NameValuePairs
    extends Object
    Represents a query string or form data.

    Create an instance using one of the static factory methods.

    • Method Detail

      • of

        public static NameValuePairs of​(Map<String,​?> map)
        Returns a new instance using the entries of the given map in the map's iteration order.
        Parameters:
        map - Entries MUST NOT be URL-encoded; they will be URL-encoded automatically
      • of

        public static NameValuePairs of​(NameValuePair... pairs)
        Returns a new instance that may have repeated names (for example, "number=1&number=2").
      • of

        public static NameValuePairs of​(List<NameValuePair> pairs)
        Returns a new instance that may have repeated names (for example, "number=1&number=2").
      • ofPreEncoded

        public static NameValuePairs ofPreEncoded​(String preEncoded)
        Returns an instance that uses the given string as-is.
        Parameters:
        preEncoded - URL-encoded query string (without the "?" prefix).