org.springframework.http.client.reactive

## Class AbstractClientHttpResponse

- java.lang.Object
- - org.springframework.http.client.reactive.AbstractClientHttpResponse

- All Implemented Interfaces:
    ClientHttpResponse, HttpMessage, ReactiveHttpInputMessage

      public abstract class AbstractClientHttpResponse
      extends Object
      implements ClientHttpResponse

  Base class for `ClientHttpResponse` implementations.
  Since:
    5.3.32
  Author:
    Arjen Poutsma

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractClientHttpResponse(int statusCode, HttpHeaders headers, MultiValueMap<String,ResponseCookie> cookies, reactor.core.publisher.Flux<DataBuffer> body)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `reactor.core.publisher.Flux<DataBuffer>` | `getBody()` Return the body of the message as a `Publisher`.
    `MultiValueMap<String,ResponseCookie>` | `getCookies()` Return a read-only map of response cookies received from the server.
    `HttpHeaders` | `getHeaders()` Return the headers of this message.
    `int` | `getRawStatusCode()` Return the HTTP status code (potentially non-standard and not resolvable through the `HttpStatus` enum) as an integer.
    `HttpStatus` | `getStatusCode()` Return the HTTP status code as an `HttpStatus` enum value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.http.client.reactive.ClientHttpResponse

      `getId`

- - ### Constructor Detail

    - #### AbstractClientHttpResponse

          protected AbstractClientHttpResponse(int statusCode,
                                               HttpHeaders headers,
                                               MultiValueMap<String,ResponseCookie> cookies,
                                               reactor.core.publisher.Flux<DataBuffer> body)

  - ### Method Detail

    - #### getStatusCode

          public HttpStatus getStatusCode()

      Description copied from interface: `ClientHttpResponse`
      Return the HTTP status code as an `HttpStatus` enum value.
      Specified by:
        `getStatusCode` in interface `ClientHttpResponse`
      Returns:
        the HTTP status as an HttpStatus enum value (never `null`)
      See Also:
        `HttpStatus.valueOf(int)`

    - #### getRawStatusCode

          public int getRawStatusCode()

      Description copied from interface: `ClientHttpResponse`
      Return the HTTP status code (potentially non-standard and not resolvable through the `HttpStatus` enum) as an integer.
      Specified by:
        `getRawStatusCode` in interface `ClientHttpResponse`
      Returns:
        the HTTP status as an integer value
      See Also:
        `ClientHttpResponse.getStatusCode()`, `HttpStatus.resolve(int)`

    - #### getHeaders

          public HttpHeaders getHeaders()

      Description copied from interface: `HttpMessage`
      Return the headers of this message.
      Specified by:
        `getHeaders` in interface `HttpMessage`
      Returns:
        a corresponding HttpHeaders object (never `null`)

    - #### getCookies

          public MultiValueMap<String,ResponseCookie> getCookies()

      Description copied from interface: `ClientHttpResponse`
      Return a read-only map of response cookies received from the server.
      Specified by:
        `getCookies` in interface `ClientHttpResponse`

    - #### getBody

          public reactor.core.publisher.Flux<DataBuffer> getBody()

      Description copied from interface: `ReactiveHttpInputMessage`
      Return the body of the message as a `Publisher`.
      Specified by:
        `getBody` in interface `ReactiveHttpInputMessage`
      Returns:
        the body content publisher