Package com.xxl.tool.http.http.enums
Enum Class ContentType
- All Implemented Interfaces:
Serializable,Comparable<ContentType>,Constable
Content Type
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription标准表单编码,get请求时用x-www-form-urlencoded编码方式把form数据转换成一个字串(name1=value1&name2=value2…)JSON编码text/html编码text/plain编码text/xml编码XML编码 -
Method Summary
Modifier and TypeMethodDescriptiongetValue()获取 value获取 value + charsettoString()static ContentTypeReturns the enum constant of this class with the specified name.static ContentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORM_URLENCODED
标准表单编码,get请求时用x-www-form-urlencoded编码方式把form数据转换成一个字串(name1=value1&name2=value2…) -
JSON
JSON编码 -
XML
XML编码 -
TEXT_PLAIN
text/plain编码 -
TEXT_XML
text/xml编码 -
TEXT_HTML
text/html编码
-
-
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
-
getValue
获取 value -
getValue
获取 value + charsetContentType.JSON.getValue(StandardCharsets.UTF_8) = application/json;charset=UTF-8 ContentType.JSON.getValue() = application/json -
toString
- Overrides:
toStringin classEnum<ContentType>
-