Class ReactiveResponse
- java.lang.Object
-
- org.eclipse.jetty.reactive.client.ReactiveResponse
-
public class ReactiveResponse extends Object
A reactive wrapper over Jetty's
HttpClientResponse.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReactiveResponse.ContentCollects utility methods to process response content.static classReactiveResponse.Event
-
Constructor Summary
Constructors Constructor Description ReactiveResponse(ReactiveRequest request, org.eclipse.jetty.client.api.Response response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEncoding()org.eclipse.jetty.http.HttpFieldsgetHeaders()StringgetMediaType()ReactiveRequestgetReactiveRequest()org.eclipse.jetty.client.api.ResponsegetResponse()intgetStatus()StringtoString()
-
-
-
Constructor Detail
-
ReactiveResponse
public ReactiveResponse(ReactiveRequest request, org.eclipse.jetty.client.api.Response response)
-
-
Method Detail
-
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-Typeheader - See Also:
getEncoding()
-
getEncoding
public String getEncoding()
- Returns:
- the encoding specified by the
Content-Typeheader - See Also:
getMediaType()
-
-