Module org.htmlunit

Enum Class Headers.Guard

java.lang.Object
java.lang.Enum<Headers.Guard>
org.htmlunit.javascript.host.fetch.Headers.Guard
All Implemented Interfaces:
Serializable, Comparable<Headers.Guard>, Constable
Enclosing class:
Headers

public static enum Headers.Guard extends Enum<Headers.Guard>
The guard of a headers object; determines which changes are allowed.
See Also:
  • Enum Constant Details

    • NONE

      public static final Headers.Guard NONE
      All changes are allowed.
    • REQUEST

      public static final Headers.Guard REQUEST
      The headers of a request; changes of forbidden request headers are ignored.
    • REQUEST_NO_CORS

      public static final Headers.Guard REQUEST_NO_CORS
      The headers of a request in mode 'no-cors'; only the no-CORS-safelisted request headers (with safe values) can be changed.
    • RESPONSE

      public static final Headers.Guard RESPONSE
      The headers of a response; changes of forbidden response headers are ignored.
    • IMMUTABLE

      public static final Headers.Guard IMMUTABLE
      No changes are allowed.
  • Method Details

    • values

      public static Headers.Guard[] 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 Headers.Guard 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