N
- The native request typeB
- The body typepublic interface ServletHttpRequest<N,B>
extends io.micronaut.http.HttpRequest<B>
Modifier and Type | Method and Description |
---|---|
default java.lang.String |
getContextPath() |
java.io.InputStream |
getInputStream()
Returns an
InputStream that can be used to read the body of this HTTP request. |
N |
getNativeRequest() |
java.io.BufferedReader |
getReader()
Returns a
BufferedReader that can be used to read the text body of this HTTP request. |
default boolean |
isAsyncSupported()
Checks if this request supports asynchronous operation.
|
default org.reactivestreams.Publisher<? extends io.micronaut.http.MutableHttpResponse<?>> |
subscribeOnExecutor(org.reactivestreams.Publisher<? extends io.micronaut.http.MutableHttpResponse<?>> responsePublisher)
Causes the container to dispatch a thread, possibly from a managed
thread pool, to run the specified Runnable.
|
create, create, DELETE, DELETE, DELETE, GET, GET, getCertificate, getCookies, getLocale, getMethod, getMethodName, getParameters, getPath, getRemoteAddress, getServerAddress, getServerName, getUri, getUserPrincipal, getUserPrincipal, HEAD, HEAD, isSecure, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT, setAttribute
default java.lang.String getContextPath()
java.io.InputStream getInputStream() throws java.io.IOException
InputStream
that can be used to read the body of this HTTP request.
This method is typically used to read binary data. If the body is text, the
getReader()
method is more appropriate.java.io.IOException
- if a valid InputStream
cannot be returned for some reason.java.lang.IllegalStateException
- if getReader()
has already been called on this instance.java.io.BufferedReader getReader() throws java.io.IOException
BufferedReader
that can be used to read the text body of this HTTP request.java.io.IOException
- if a valid BufferedReader
cannot be returned for some reason.java.lang.IllegalStateException
- if getInputStream()
has already been called on this
instance.N getNativeRequest()
default boolean isAsyncSupported()
Asynchronous operation is disabled for this request if this request is within the scope of a filter or servlet that has not been annotated or flagged in the deployment descriptor as being able to support asynchronous handling.
default org.reactivestreams.Publisher<? extends io.micronaut.http.MutableHttpResponse<?>> subscribeOnExecutor(org.reactivestreams.Publisher<? extends io.micronaut.http.MutableHttpResponse<?>> responsePublisher)
responsePublisher
- The response publisher