Interface HeadersClientResponse

All Superinterfaces:
Headers, Iterable<Http.HeaderValue>
All Known Subinterfaces:
HeadersServerResponse

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

    • create

      static HeadersClientResponse create(Headers responseHeaders)
      Create a new instance from headers parsed from client response.
      Parameters:
      responseHeaders - client response headers
      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 Http.Header.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 Http.Header.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 Http.Header.EXPIRES header.

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

      Returns:
      Expires header value.