Package org.miaixz.bus.core.net.url
Enum Class UrlQuery.EncodeMode
- All Implemented Interfaces:
Serializable,Comparable<UrlQuery.EncodeMode>,Constable
- Enclosing class:
UrlQuery
编码模式
根据不同场景以及不同环境,对Query中的name和value采用不同的编码策略
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionx-www-form-urlencoded模式,此模式下空格会编码为'+',"~"和"*"会被转义正常模式(宽松模式),这种模式下,部分分隔符无需转义严格模式,此模式下,非UNRESERVED的字符都会被转义 -
Method Summary
Modifier and TypeMethodDescriptionstatic UrlQuery.EncodeModeReturns the enum constant of this class with the specified name.static UrlQuery.EncodeMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
正常模式(宽松模式),这种模式下,部分分隔符无需转义 -
FORM_URL_ENCODED
x-www-form-urlencoded模式,此模式下空格会编码为'+',"~"和"*"会被转义 -
STRICT
严格模式,此模式下,非UNRESERVED的字符都会被转义
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-