Class ApachePatch.URLEncodedUtils

java.lang.Object
com.easypost.easyvcr.internal.ApachePatch.URLEncodedUtils
Enclosing class:
ApachePatch

public static class ApachePatch.URLEncodedUtils extends Object
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 Details

    • URLEncodedUtils

      public URLEncodedUtils()
      Constructs a new instance.
  • Method Details

    • parse

      public static List<ApachePatch.NameValuePair> parse(@NotNull @NotNull URI uri, Charset charset)
      Parses the given URI query parameters as a list of name-value pairs.
      Parameters:
      uri - the URI to parse
      charset - the charset to use
      Returns:
      the list of name-value pairs
    • parse

      public static List<ApachePatch.NameValuePair> parse(String s, Charset charset)
      Parses the given string as a list of name-value pairs.
      Parameters:
      s - the string to parse
      charset - 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 parse
      charset - the charset to use
      separators - 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 format
      charset - 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 format
      parameterSeparator - the separator to use between name-value pairs
      charset - the charset to use
      Returns:
      a query string