- 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, trailers
Methods inherited from interface io.inverno.mod.http.client.InterceptedResponse
isReceived
-
Method Details
-
trailers
InterceptedWebResponse trailers(Consumer<OutboundHeaders<?>> trailersConfigurer) throws IllegalStateException Description copied from interface:InterceptedResponse
Configures the HTTP trailers of the response to return in case the request sent is cancelled.
- Specified by:
trailers
in 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:InterceptedResponse
Configures the HTTP headers of the response to return in case the request sent is cancelled.
- Specified by:
headers
in 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:InterceptedResponse
Returns the response body.
- Specified by:
body
in interfaceInterceptedResponse
- Returns:
- the response body
-