- All Superinterfaces:
BaseResponse,InterceptedResponse
An intercepted Web response extending HTTP client InterceptedResponse.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the response body.headers(Consumer<OutboundResponseHeaders> headersConfigurer) Configures the HTTP headers of the response to return in case the request sent is cancelled.trailers(Consumer<OutboundHeaders<?>> trailersConfigurer) Configures the HTTP trailers of the response to return in case the request sent is cancelled.Methods inherited from interface io.inverno.mod.http.base.BaseResponse
headers, trailersMethods inherited from interface io.inverno.mod.http.client.InterceptedResponse
isReceived
-
Method Details
-
trailers
InterceptedWebResponse trailers(Consumer<OutboundHeaders<?>> trailersConfigurer) throws IllegalStateException Description copied from interface:InterceptedResponseConfigures the HTTP trailers of the response to return in case the request sent is cancelled.
- Specified by:
trailersin interfaceInterceptedResponse- Parameters:
trailersConfigurer- an outbound headers configurer- Returns:
- the request
- Throws:
IllegalStateException- if the response has already been received from the endpoint
-
headers
InterceptedWebResponse headers(Consumer<OutboundResponseHeaders> headersConfigurer) throws IllegalStateException Description copied from interface:InterceptedResponseConfigures the HTTP headers of the response to return in case the request sent is cancelled.
- Specified by:
headersin interfaceInterceptedResponse- Parameters:
headersConfigurer- an outbound response headers configurer- Returns:
- the request
- Throws:
IllegalStateException- if the response has already been received from the endpoint
-
body
InterceptedWebResponseBody body()Description copied from interface:InterceptedResponseReturns the response body.
- Specified by:
bodyin interfaceInterceptedResponse- Returns:
- the response body
-