Package org.azd.enums

Enum Class CustomHeader

java.lang.Object
java.lang.Enum<CustomHeader>
org.azd.enums.CustomHeader
All Implemented Interfaces:
Serializable, Comparable<CustomHeader>, Constable

public enum CustomHeader extends Enum<CustomHeader>
Custom header type to set headers for request/response
  • Enum Constant Details

    • JSON_CONTENT_TYPE

      public static final CustomHeader JSON_CONTENT_TYPE
      Json content type applicable for most of the post request. "Content-Type", "application/json"
    • JSON

      public static final CustomHeader JSON
      Json content to accept "Accept", "application/json"
    • JSON_PATCH

      public static final CustomHeader JSON_PATCH
      Should be used for post or patch operations "Content-Type", "application/json-patch+json"
    • TEXT_CONTENT

      public static final CustomHeader TEXT_CONTENT
      To accept the plain text response "Accept", "text/plain"
    • URL_ENCODED

      public static final CustomHeader URL_ENCODED
      For url encoded request/response "Content-Type", "application/x-www-form-urlencoded"
    • STREAM

      public static final CustomHeader STREAM
      Should be set for stream upload "Content-Type", "application/octet-stream"
    • STREAM_ZIP

      public static final CustomHeader STREAM_ZIP
      Should be set for stream upload/download as zip content "Content-Type", "application/zip"
    • STREAM_ZIP_ACCEPT

      public static final CustomHeader STREAM_ZIP_ACCEPT
      Should be set to accept the stream content from Api as zip
    • CUSTOM_HEADER

      public static final CustomHeader CUSTOM_HEADER
      Empty custom header to set the desired values Call setCustomHeaders() method and set the values.
    • STREAM_ACCEPT

      public static final CustomHeader STREAM_ACCEPT
      Should be set to accept the stream content from Api
  • Method Details

    • values

      public static CustomHeader[] 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 CustomHeader 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
    • getName

      public String getName()
    • getValue

      public String getValue()
    • setCustomHeaders

      public void setCustomHeaders(String name, String value)