All Implemented Interfaces:
Serializable, Header, NameValuePair

@Header("Debug") public class Debug extends BasicBooleanHeader
Represents a parsed Debug HTTP request/response header.

Specifies to enable debug mode on the current request.

Example

Debug: true

Not part of the RFC2616 specification, but provided to allow for debugging of HTTP requests.
It's up to the server to decide whether to honor this header.

See Also:
  • Field Details

    • TRUE

      public static final Debug TRUE
      Constant for true value.
    • FALSE

      public static final Debug FALSE
      Constant for false value.
  • Constructor Details

    • Debug

      public Debug(Boolean value)
      Constructor.
      Parameters:
      value - The header value.
      Can be null to create a header with no value.
    • Debug

      public Debug(String value)
      Constructor.
      Parameters:
      value - The header value.
      Must be parsable by Boolean.parseBoolean(String).
      Can be null to create a header with no value.
    • Debug

      public Debug(Supplier<Boolean> value)
      Constructor with delayed value.

      Header value is re-evaluated on each call to BasicBooleanHeader.getValue().

      Parameters:
      value - The supplier of the header value.
      Can be null to create a header with no value.
  • Method Details

    • of

      public static Debug of(Boolean value)
      Static creator.
      Parameters:
      value - The header value.
      Can be null.
      Returns:
      A new header bean, or null if the value was null.
    • of

      public static Debug of(String value)
      Static creator.
      Parameters:
      value - The header value.
      Must be parsable by Boolean.parseBoolean(String).
      Can be null.
      Returns:
      A new header bean, or null if the value was null.
    • of

      public static Debug of(Supplier<Boolean> value)
      Static creator with delayed value.

      Header value is re-evaluated on each call to BasicBooleanHeader.getValue().

      Parameters:
      value - The header value supplier.
      Can be null.
      Returns:
      A new header bean, or null if the value was null.