org.springframework.http.client.reactive

## Class ClientHttpResponseDecorator

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

- All Implemented Interfaces:
    ClientHttpResponse, HttpMessage, ReactiveHttpInputMessage

      public class ClientHttpResponseDecorator
      extends Object
      implements ClientHttpResponse

  Wraps another `ClientHttpResponse` and delegates all methods to it. Subclasses can override specific methods selectively.
  Since:
    5.0
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientHttpResponseDecorator(ClientHttpResponse delegate)`

  - ### 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.
    `ClientHttpResponse` | `getDelegate()`
    `HttpHeaders` | `getHeaders()` Return the headers of this message.
    `String` | `getId()` Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.
    `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.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ClientHttpResponseDecorator

          public ClientHttpResponseDecorator(ClientHttpResponse delegate)

  - ### Method Detail

    - #### getDelegate

          public ClientHttpResponse getDelegate()

    - #### getId

          public String getId()

      Description copied from interface: `ClientHttpResponse`
      Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.
      Specified by:
        `getId` in interface `ClientHttpResponse`

    - #### 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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`