Enum Class UrlQuery.EncodeMode

java.lang.Object
java.lang.Enum<UrlQuery.EncodeMode>
org.miaixz.bus.core.net.url.UrlQuery.EncodeMode
All Implemented Interfaces:
Serializable, Comparable<UrlQuery.EncodeMode>, Constable
Enclosing class:
UrlQuery

public static enum UrlQuery.EncodeMode extends Enum<UrlQuery.EncodeMode>
编码模式 根据不同场景以及不同环境,对Query中的name和value采用不同的编码策略
  • Enum Constant Details

    • NORMAL

      public static final UrlQuery.EncodeMode NORMAL
      正常模式(宽松模式),这种模式下,部分分隔符无需转义
    • FORM_URL_ENCODED

      public static final UrlQuery.EncodeMode FORM_URL_ENCODED
      x-www-form-urlencoded模式,此模式下空格会编码为'+',"~"和"*"会被转义
    • STRICT

      public static final UrlQuery.EncodeMode STRICT
      严格模式,此模式下,非UNRESERVED的字符都会被转义
  • Method Details

    • values

      public static UrlQuery.EncodeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UrlQuery.EncodeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null