org.apache.hc.core5.net

## Class URLEncodedUtils

- java.lang.Object
- - org.apache.hc.core5.net.URLEncodedUtils

- Deprecated.
  Use `URIBuilder` to parse and format `URI`s and `WWWFormCodec` to parse and format `application/x-www-form-urlencoded` forms.

      @Deprecated
      public class URLEncodedUtils
      extends Object

  A collection of utilities for encoding URLs.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `URLEncodedUtils()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `format(Iterable<? extends NameValuePair> parameters, char parameterSeparator, Charset charset)` Deprecated. Returns a String that is suitable for use as an `application/x-www-form-urlencoded` list of parameters in an HTTP PUT or HTTP POST.
    `static String` | `format(Iterable<? extends NameValuePair> parameters, Charset charset)` Deprecated. Returns a String that is suitable for use as an `application/x-www-form-urlencoded` list of parameters in an HTTP PUT or HTTP POST.
    `static String` | `formatSegments(Iterable<String> segments, Charset charset)` Deprecated. Returns a string consisting of joint encoded path segments.
    `static String` | `formatSegments(String... segments)` Deprecated. Returns a string consisting of joint encoded path segments.
    `static List<NameValuePair>` | `parse(CharSequence s, Charset charset)` Deprecated. Returns a list of `NameValuePair`s URI query parameters.
    `static List<NameValuePair>` | `parse(CharSequence s, Charset charset, char... separators)` Deprecated. Returns a list of `NameValuePair`s parameters.
    `static List<NameValuePair>` | `parse(URI uri, Charset charset)` Deprecated. Returns a list of `NameValuePair`s URI query parameters.
    `static List<String>` | `parsePathSegments(CharSequence s)` Deprecated. Returns a list of URI path segments.
    `static List<String>` | `parsePathSegments(CharSequence s, Charset charset)` Deprecated. Returns a list of URI path segments.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### URLEncodedUtils

          public URLEncodedUtils()

      Deprecated.

  - ### Method Detail

    - #### parse

          public static List<NameValuePair> parse(URI uri,
                                  Charset charset)

      Deprecated.
      Returns a list of `NameValuePair`s URI query parameters. By convention, `'&'` and `';'` are accepted as parameter separators.
      Parameters:
        `uri` - input URI.
        `charset` - parameter charset.
      Returns:
        list of query parameters.
      Since:
        4.5

    - #### parse

          public static List<NameValuePair> parse(CharSequence s,
                                  Charset charset)

      Deprecated.
      Returns a list of `NameValuePair`s URI query parameters. By convention, `'&'` and `';'` are accepted as parameter separators.
      Parameters:
        `s` - URI query component.
        `charset` - charset to use when decoding the parameters.
      Returns:
        list of query parameters.
      Since:
        4.2

    - #### parse

          public static List<NameValuePair> parse(CharSequence s,
                                  Charset charset,
                                  char... separators)

      Deprecated.
      Returns a list of `NameValuePair`s parameters.
      Parameters:
        `s` - input text.
        `charset` - parameter charset.
        `separators` - parameter separators.
      Returns:
        list of query parameters.
      Since:
        4.4

    - #### parsePathSegments

          public static List<String> parsePathSegments(CharSequence s,
                                       Charset charset)

      Deprecated.
      Returns a list of URI path segments.
      Parameters:
        `s` - URI path component.
        `charset` - parameter charset.
      Returns:
        list of segments.
      Since:
        4.5

    - #### parsePathSegments

          public static List<String> parsePathSegments(CharSequence s)

      Deprecated.
      Returns a list of URI path segments.
      Parameters:
        `s` - URI path component.
      Returns:
        list of segments.
      Since:
        4.5

    - #### formatSegments

          public static String formatSegments(Iterable<String> segments,
                              Charset charset)

      Deprecated.
      Returns a string consisting of joint encoded path segments.
      Parameters:
        `segments` - the segments.
        `charset` - parameter charset.
      Returns:
        URI path component
      Since:
        4.5

    - #### formatSegments

          public static String formatSegments(String... segments)

      Deprecated.
      Returns a string consisting of joint encoded path segments.
      Parameters:
        `segments` - the segments.
      Returns:
        URI path component
      Since:
        4.5

    - #### format

          public static String format(Iterable<? extends NameValuePair> parameters,
                      char parameterSeparator,
                      Charset charset)

      Deprecated.
      Returns a String that is suitable for use as an `application/x-www-form-urlencoded` list of parameters in an HTTP PUT or HTTP POST.
      Parameters:
        `parameters` - The parameters to include.
        `parameterSeparator` - The parameter separator, by convention, `'&'` or `';'`.
        `charset` - The encoding to use.
      Returns:
        An `application/x-www-form-urlencoded` string
      Since:
        4.3

    - #### format

          public static String format(Iterable<? extends NameValuePair> parameters,
                      Charset charset)

      Deprecated.
      Returns a String that is suitable for use as an `application/x-www-form-urlencoded` list of parameters in an HTTP PUT or HTTP POST.
      Parameters:
        `parameters` - The parameters to include.
        `charset` - The encoding to use.
      Returns:
        An `application/x-www-form-urlencoded` string
      Since:
        4.2

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.