Interface ClientResponseHeaders

All Superinterfaces:
Headers, Iterable<Header>
All Known Subinterfaces:
ServerResponseHeaders

public interface ClientResponseHeaders extends Headers
HTTP Headers of a client response.
  • Method Details

    • create

      static ClientResponseHeaders create(Headers responseHeaders)
      Create a new instance from headers parsed from client response. Strict media type parsing mode is used for Content-Type header.
      Parameters:
      responseHeaders - client response headers
      Returns:
      immutable instance of client response HTTP headers
    • create

      static ClientResponseHeaders create(Headers responseHeaders, ParserMode parserMode)
      Create a new instance from headers parsed from client response.
      Parameters:
      responseHeaders - client response headers
      parserMode - media type parsing mode
      Returns:
      immutable instance of client response HTTP headers
    • acceptPatches

      default List<HttpMediaType> acceptPatches()
      Accepted patches.
      Returns:
      list of accepted patches media types
    • location

      default Optional<URI> location()
      Optionally gets the value of HeaderNames.LOCATION header.

      Used in redirection, or when a new resource has been created.

      Returns:
      Location header value.
    • lastModified

      default Optional<ZonedDateTime> lastModified()
      Optionally gets the value of HeaderNames.LAST_MODIFIED header.

      The last modified date for the requested object.

      Returns:
      Last modified header value.
    • expires

      default Optional<ZonedDateTime> expires()
      Optionally gets the value of HeaderNames.EXPIRES header.

      Gives the date/time after which the response is considered stale.

      Returns:
      Expires header value.