- All Superinterfaces:
BaseResponse
,Response
A request with supports for body encoding based on the response content type.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbody()
Returns the response body used to produce response payload.headers
(Consumer<OutboundResponseHeaders> headersConfigurer) Configures the HTTP headers to send in the response.trailers
(Consumer<OutboundHeaders<?>> trailersConfigurer) Configures the HTTP trailers to send in the response.Methods inherited from interface io.inverno.mod.http.base.BaseResponse
headers, trailers
Methods inherited from interface io.inverno.mod.http.server.Response
getTransferedLength, isHeadersWritten, sendContinue
-
Method Details
-
body
WebResponseBody body()Description copied from interface:Response
Returns the response body used to produce response payload.
-
headers
WebResponse headers(Consumer<OutboundResponseHeaders> headersConfigurer) throws IllegalStateException Description copied from interface:Response
Configures the HTTP headers to send in the response.
- Specified by:
headers
in interfaceResponse
- Parameters:
headersConfigurer
- a response headers configurer- Returns:
- the response
- Throws:
IllegalStateException
- if response headers have already been sent to the client
-
trailers
Description copied from interface:Response
Configures the HTTP trailers to send in the response.
-