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)
.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReactiveResponse.Content
Collects utility methods to process response content.static class
ReactiveResponse.Event
-
Constructor Summary
Constructors Constructor Description ReactiveResponse(ReactiveRequest request, org.eclipse.jetty.client.api.Response response)
-
Method Summary
Modifier and Type Method Description String
getEncoding()
org.eclipse.jetty.http.HttpFields
getHeaders()
String
getMediaType()
ReactiveRequest
getReactiveRequest()
org.eclipse.jetty.client.api.Response
getResponse()
int
getStatus()
String
toString()
-
Constructor Details
-
ReactiveResponse
-
-
Method Details
-
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
- Returns:
- the media type specified by the
Content-Type
header - See Also:
getEncoding()
-
getEncoding
- Returns:
- the encoding specified by the
Content-Type
header - See Also:
getMediaType()
-
toString
-