- 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, trailersMethods 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:ResponseConfigures the HTTP headers to send in the response.
- Specified by:
headersin 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:ResponseSends 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:
sendContinuein interfaceResponse- Returns:
- the response
- Throws:
IllegalStateException- if response headers have already been sent to the client
-
body
WebResponseBody body()Description copied from interface:ResponseReturns the response body used to produce response payload.
-
trailers
Description copied from interface:ResponseConfigures the HTTP trailers to send in the response.
-