Package io.micronaut.http
Interface FullHttpRequest<B>
- Type Parameters:
B
- The body type
- All Superinterfaces:
AttributeHolder
,HttpMessage<B>
,HttpRequest<B>
,MutableAttributeHolder
- All Known Implementing Classes:
NettyHttpRequest
Allows introspecting whether the request is a full http request.
- Since:
- 1.1.0
- Author:
- James Kleeh
-
Field Summary
Fields inherited from interface io.micronaut.http.HttpRequest
SCHEME_HTTP, SCHEME_HTTPS
-
Method Summary
Methods inherited from interface io.micronaut.core.attr.AttributeHolder
getAttribute, getAttribute
Methods inherited from interface io.micronaut.http.HttpMessage
getAttributes, getBody, getBody, getBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentType, getHeaders
Methods inherited from interface io.micronaut.http.HttpRequest
accept, getCertificate, getCookies, getHttpVersion, getLocale, getMethod, getMethodName, getOrigin, getParameters, getPath, getRemoteAddress, getServerAddress, getServerName, getUri, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttribute
Methods inherited from interface io.micronaut.core.attr.MutableAttributeHolder
removeAttribute
-
Method Details
-
isFull
default boolean isFull()Shortcut forcontents() != null
.- Returns:
- Is the request full.
-
contents
Get the raw body of this request. May be called multiple times. Buffer ownership is not transferred to the caller.- Returns:
- The body contents or null if there are none or they are not obtainable.
-
bufferContents
Get the contents of this request as a buffer. If this is a streaming request, the returned flow may be delayed. If buffering is not supported for this request, this may returnnull
. Once the returned flow completes,contents()
must return the same value.- Returns:
- The request content, or
null
if buffering is not supported
-