Package org.azd.enums
Enum Class CustomHeader
- All Implemented Interfaces:
Serializable
,Comparable<CustomHeader>
,Constable
Custom header type to set headers for request/response
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEmpty custom header to set the desired values Call setCustomHeaders() method and set the values.Json content to accept "Accept", "application/json"Json content type applicable for most of the post request.Json content type applicable for most of the post request.Should be used for post or patch operations "Content-Type", "application/json-patch+json"Should be set for stream upload "Content-Type", "application/octet-stream"Should be set to accept the stream content from ApiShould be set for stream upload/download as zip content "Content-Type", "application/zip"Should be set to accept the stream content from Api as zipTo accept the plain text response "Accept", "text/plain"For url encoded request/response "Content-Type", "application/x-www-form-urlencoded"Json content type applicable for most of the post request. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
getValue()
void
setCustomHeaders
(String name, String value) static CustomHeader
Returns the enum constant of this class with the specified name.static CustomHeader[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JSON_CONTENT_TYPE
Json content type applicable for most of the post request. "Content-Type", "application/json" -
JSON_CONTENT_TYPE_UTF_8
Json content type applicable for most of the post request. "Content-Type", "application/json; charset=utf-8" -
JSON
Json content to accept "Accept", "application/json" -
JSON_PATCH
Should be used for post or patch operations "Content-Type", "application/json-patch+json" -
TEXT_CONTENT
To accept the plain text response "Accept", "text/plain" -
XML_CONTENT_TYPE
Json content type applicable for most of the post request. "Content-Type", "application/json" -
URL_ENCODED
For url encoded request/response "Content-Type", "application/x-www-form-urlencoded" -
STREAM
Should be set for stream upload "Content-Type", "application/octet-stream" -
STREAM_ZIP
Should be set for stream upload/download as zip content "Content-Type", "application/zip" -
STREAM_ZIP_ACCEPT
Should be set to accept the stream content from Api as zip -
CUSTOM_HEADER
Empty custom header to set the desired values Call setCustomHeaders() method and set the values. -
STREAM_ACCEPT
Should be set to accept the stream content from Api
-
-
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
-
getName
-
getValue
-
setCustomHeaders
-