Interface ByteBody
- All Superinterfaces:
HttpBody
- All Known Implementing Classes:
ImmediateByteBody
,StreamingByteBody
@Internal
public sealed interface ByteBody
extends HttpBody
permits ImmediateByteBody, StreamingByteBody
Base class for a raw
HttpBody
with just bytes.- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionbuffer
(io.netty.buffer.ByteBufAllocator alloc) Fully buffer this body.static ByteBody
of
(io.netty.handler.codec.http.HttpRequest request) Create a byte body for the given request.processMulti
(HttpContentProcessor processor) Process this body using the given processor.
-
Method Details
-
processMulti
Process this body using the given processor.- Parameters:
processor
- The processor to apply- Returns:
- The new processed body
- Throws:
Throwable
- Any exception thrown by the processor. Not all processing failures may throw immediately, however
-
buffer
Fully buffer this body.- Parameters:
alloc
- The allocator for storage- Returns:
- A flow that completes when all data has been read
-
of
Create a byte body for the given request. The request must be either aFullHttpRequest
or aStreamedHttpRequest
.- Parameters:
request
- The request- Returns:
- The
ByteBody
for the body data
-