Interface ClientResponse.Headers

All Known Implementing Classes:
ClientResponseWrapper.HeadersWrapper
Enclosing interface:
ClientResponse

public static interface ClientResponse.Headers
Represents the headers of the HTTP response.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.HttpHeaders
    Return the headers as an HttpHeaders instance.
    Return the length of the body in bytes, as specified by the Content-Length header.
    Optional<org.springframework.http.MediaType>
    Return the media type of the body, as specified by the Content-Type header.
    header(String headerName)
    Return the header value(s), if any, for the header of the given name.
  • Method Details

    • contentLength

      OptionalLong contentLength()
      Return the length of the body in bytes, as specified by the Content-Length header.
    • contentType

      Optional<org.springframework.http.MediaType> contentType()
      Return the media type of the body, as specified by the Content-Type header.
    • header

      List<String> header(String headerName)
      Return the header value(s), if any, for the header of the given name.

      Return an empty list if no header values are found.

      Parameters:
      headerName - the header name
    • asHttpHeaders

      org.springframework.http.HttpHeaders asHttpHeaders()
      Return the headers as an HttpHeaders instance.