Interface InboundResponseHeaders

All Superinterfaces:
InboundHeaders
All Known Subinterfaces:
OutboundResponseHeaders

public interface InboundResponseHeaders extends InboundHeaders

Represents immutable inbound HTTP response headers.

This extends the InboundHeaders to expose response specific information like response status, content type, content length and set-cookies.

An inbound response is received by a client in a client exchange.

Since:
1.6
Author:
Jeremy Kuhn
  • Method Details

    • getStatus

      Status getStatus() throws IllegalArgumentException

      Returns the response HTTP status.

      Returns:
      the response status
      Throws:
      IllegalArgumentException - if the status code specified in the headers is not a known HTTP status
    • getStatusCode

      int getStatusCode()

      Returns the response HTTP status code.

      Returns:
      the response status code
    • getContentType

      String getContentType()

      Returns the content type header field value of the request.

      Returns:
      the content type or null
    • getContentTypeHeader

      Headers.ContentType getContentTypeHeader()

      Decodes and returns the content type header of the request.

      Returns:
      the decoded content type header
    • getContentLength

      Long getContentLength()

      Returns the content length of the request.

      Returns:
      the content length or null
    • cookies

      Returns the set-cookies defined in the response.

      Returns:
      the set-cookies