Package io.micronaut.servlet.http
Class ServletResponseFactory
java.lang.Object
io.micronaut.servlet.http.ServletResponseFactory
- All Implemented Interfaces:
io.micronaut.http.HttpResponseFactory
An implementation of the
HttpResponseFactory
case that retrieves the
response object from the current request bound to the current thread.- Since:
- 2.0.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.http.HttpResponseFactory
INSTANCE
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.HttpResponseFactory
ok, status
-
Constructor Details
-
ServletResponseFactory
public ServletResponseFactory()
-
-
Method Details
-
ok
public <T> io.micronaut.http.MutableHttpResponse<T> ok(T body) - Specified by:
ok
in interfaceio.micronaut.http.HttpResponseFactory
-
status
public <T> io.micronaut.http.MutableHttpResponse<T> status(io.micronaut.http.HttpStatus status, String reason) - Specified by:
status
in interfaceio.micronaut.http.HttpResponseFactory
-
status
- Specified by:
status
in interfaceio.micronaut.http.HttpResponseFactory
-
status
public <T> io.micronaut.http.MutableHttpResponse<T> status(io.micronaut.http.HttpStatus status, T body) - Specified by:
status
in interfaceio.micronaut.http.HttpResponseFactory
-