Package com.couchbase.client.java.http
Class NameValuePairs
- java.lang.Object
-
- com.couchbase.client.java.http.NameValuePairs
-
public class NameValuePairs extends Object
Represents a query string or form data.Create an instance using one of the static factory methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NameValuePairs
of(NameValuePair... pairs)
Returns a new instance that may have repeated names (for example, "number=1&number=2").static NameValuePairs
of(List<NameValuePair> pairs)
Returns a new instance that may have repeated names (for example, "number=1&number=2").static NameValuePairs
of(Map<String,?> map)
Returns a new instance using the entries of the given map in the map's iteration order.static NameValuePairs
ofPreEncoded(String preEncoded)
Returns an instance that uses the given string as-is.String
toString()
-
-
-
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).
-
-