- All Superinterfaces:
BaseResponse
,Response
A response 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.Sends an interim 100 continue response to the client so it can send the rest of the request.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
getTransferredLength, isHeadersWritten
-
Method Details
-
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
-
sendContinue
Description copied from interface:Response
Sends an interim 100 continue response to the client so it can send the rest of the request.
This method should only be used when the request contains header
expect: 100-continue
.- Specified by:
sendContinue
in interfaceResponse
- Returns:
- the response
- Throws:
IllegalStateException
- if response headers have already been sent to the client
-
body
WebResponseBody body()Description copied from interface:Response
Returns the response body used to produce response payload.
-
trailers
Description copied from interface:Response
Configures the HTTP trailers to send in the response.
-