public interface HttpResponseFactory
MutableHttpResponse
instances.Modifier and Type | Field and Description |
---|---|
static HttpResponseFactory |
INSTANCE
The default
CookieFactory instance. |
Modifier and Type | Method and Description |
---|---|
default <T> MutableHttpResponse<T> |
ok() |
<T> MutableHttpResponse<T> |
ok(T body)
Creates an
HttpStatus.OK response with a body. |
default <T> MutableHttpResponse<T> |
status(HttpStatus status) |
<T> MutableHttpResponse<T> |
status(HttpStatus status,
String reason)
Return a response for the given status.
|
<T> MutableHttpResponse<T> |
status(HttpStatus status,
T body)
Return a response for the given status.
|
static final HttpResponseFactory INSTANCE
CookieFactory
instance.<T> MutableHttpResponse<T> ok(T body)
HttpStatus.OK
response with a body.T
- The body typebody
- The body<T> MutableHttpResponse<T> status(HttpStatus status, String reason)
T
- The response typestatus
- The statusreason
- An alternatively reason message<T> MutableHttpResponse<T> status(HttpStatus status, T body)
T
- The body typestatus
- The statusbody
- The bodydefault <T> MutableHttpResponse<T> ok()
T
- The response typedefault <T> MutableHttpResponse<T> status(HttpStatus status)
T
- The response typestatus
- The status