Class ReactiveResponse

java.lang.Object
org.eclipse.jetty.reactive.client.ReactiveResponse

public class ReactiveResponse extends Object

A reactive wrapper over Jetty's HttpClient Response.

A ReactiveResponse is available as soon as the response headers arrived to the client. The response content is processed by a response content function specified in ReactiveRequest.response(BiFunction).

  • Constructor Details

    • ReactiveResponse

      public ReactiveResponse(ReactiveRequest request, org.eclipse.jetty.client.api.Response response)
  • Method Details

    • getReactiveRequest

      public ReactiveRequest getReactiveRequest()
      Returns:
      the ReactiveRequest correspondent to this response
    • getResponse

      public org.eclipse.jetty.client.api.Response getResponse()
      Returns:
      the wrapped Jetty response
    • getStatus

      public int getStatus()
      Returns:
      the HTTP status code
    • getHeaders

      public org.eclipse.jetty.http.HttpFields getHeaders()
      Returns:
      the HTTP response headers
    • getMediaType

      public String getMediaType()
      Returns:
      the media type specified by the Content-Type header
      See Also:
    • getEncoding

      public String getEncoding()
      Returns:
      the encoding specified by the Content-Type header
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object