Package com.easypost.easyvcr.internal
Class ApachePatch.URLEncodedUtils
java.lang.Object
com.easypost.easyvcr.internal.ApachePatch.URLEncodedUtils
- Enclosing class:
- ApachePatch
This class was lifted and modified from
org.apache.httpcomponents:httpclient version 4.5.14,
namespace org.apache.http.client.utils.URLEncodedUtils,
released under the Apache License 2.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringformat(@NotNull Iterable<? extends ApachePatch.NameValuePair> parameters, char parameterSeparator, Charset charset)Format the given name-value pairs into a query string.static Stringformat(Iterable<? extends ApachePatch.NameValuePair> parameters, Charset charset)Format the given name-value pairs into a query string.static List<ApachePatch.NameValuePair>Parses the given string as a list of name-value pairs.static List<ApachePatch.NameValuePair>Parses the given URI query parameters as a list of name-value pairs.static List<ApachePatch.NameValuePair>Parses the given string as a list of name-value pairs.
-
Constructor Details
-
URLEncodedUtils
public URLEncodedUtils()Constructs a new instance.
-
-
Method Details
-
parse
Parses the given URI query parameters as a list of name-value pairs.- Parameters:
uri- the URI to parsecharset- the charset to use- Returns:
- the list of name-value pairs
-
parse
Parses the given string as a list of name-value pairs.- Parameters:
s- the string to parsecharset- the charset to use- Returns:
- the list of name-value pairs
-
parse
public static List<ApachePatch.NameValuePair> parse(@NotNull @NotNull String s, Charset charset, char... separators)Parses the given string as a list of name-value pairs.- Parameters:
s- the string to parsecharset- the charset to useseparators- separators splitting a name-value pair from another name-value pair- Returns:
- the list of name-value pairs
-
format
public static String format(Iterable<? extends ApachePatch.NameValuePair> parameters, Charset charset)Format the given name-value pairs into a query string.- Parameters:
parameters- the name-value pairs to formatcharset- the charset to use- Returns:
- a query string
-
format
public static String format(@NotNull @NotNull Iterable<? extends ApachePatch.NameValuePair> parameters, char parameterSeparator, Charset charset)Format the given name-value pairs into a query string.- Parameters:
parameters- the name-value pairs to formatparameterSeparator- the separator to use between name-value pairscharset- the charset to use- Returns:
- a query string
-