Interface OutboundHeaders<A extends OutboundHeaders<A>>

Type Parameters:
A - the outbound headers type
All Superinterfaces:
InboundHeaders
All Known Subinterfaces:
OutboundRequestHeaders, OutboundResponseHeaders

public interface OutboundHeaders<A extends OutboundHeaders<A>> extends InboundHeaders

Represents mutable outbound HTTP headers.

Author:
Jeremy Kuhn
  • Method Details

    • isWritten

      boolean isWritten()

      Determines whether the headers have been sent to the recipient.

      Any attempts to specify new headers once headers have been sent, will result in an IllegalStateException being thrown.

      Returns:
      true if the headers have been sent, false otherwise
    • add

      A add(CharSequence name, CharSequence value)

      Adds a header with the specified name and value.

      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • add

      A add(Header... headers)

      Adds the specified headers.

      Parameters:
      headers - the headers to add
      Returns:
      the outbound headers
    • set

      A set(CharSequence name, CharSequence value)

      Sets the value of the header with the specified name.

      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • set

      A set(Header... headers)

      Sets the specified headers.

      Parameters:
      headers - the headers to set
      Returns:
      the outbound headers
    • remove

      A remove(CharSequence... names)

      Removes the headers with the specified names.

      Parameters:
      names - the names of the headers to remove
      Returns:
      the outbound headers