Interface ServerHttpRequest<B>
- Type Parameters:
B- The body type
- All Superinterfaces:
AttributeHolder, HttpMessage<B>, HttpRequest<B>, MutableAttributeHolder
- All Known Implementing Classes:
NettyHttpRequest
This interface extends
HttpRequest with methods that are specific to a request received
by an HTTP server.-
Field Summary
Fields inherited from interface HttpRequest
SCHEME_HTTP, SCHEME_HTTPS -
Method Summary
Modifier and TypeMethodDescriptionbyteBody()Get the bytes of the body.default ByteBodyFactoryGet aByteBodyFactorythat can be used to construct an efficient response to this request.Methods inherited from interface AttributeHolder
getAttribute, getAttributeMethods inherited from interface HttpMessage
getAttributes, getBody, getBody, getBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentType, getHeadersMethods inherited from interface HttpRequest
accept, getCertificate, getCookies, getHttpVersion, getLocale, getMethod, getMethodName, getOrigin, getParameters, getPath, getRemoteAddress, getServerAddress, getServerName, getSslSession, getUri, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttribute, setUserPrincipal, toMutableRequestMethods inherited from interface MutableAttributeHolder
removeAttribute
-
Method Details
-
byteBody
ByteBody byteBody()Get the bytes of the body. The body is owned by the request, so the caller should generally not close it or do any primary operations. The body is usually consumed by the argument binder of the controller, e.g. if it has a@Bodyargument. If you want to use the body,ByteBody.split(ByteBody.SplitBackpressureMode)it first.- Returns:
- The body bytes of this request
-
byteBodyFactory
Get aByteBodyFactorythat can be used to construct an efficient response to this request.- Returns:
- The body factory
-