Instance Propertyvapor 4.114.1Vapor
data
Request+Body.swift:11var data: ByteBuffer? { get }
var data: ByteBuffer? { get }
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct Body
final class Request
Represents an HTTP request in an application.
struct ByteBuffer
ByteBuffer
stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
var description: String { get }
var string: String? { get }
func collect(max: Int? = 1 << 14) -> EventLoopFuture<ByteBuffer?>
@preconcurrency func drain(_ handler: @escaping (BodyStreamResult) -> EventLoopFuture<Void>)
func makeAsyncIterator() -> AsyncIterator
Generates an AsyncIterator
to stream the body’s content as ByteBuffer
sequences. This implementation supports backpressure using NIOAsyncSequenceProducerBackPressureStrategies
struct AsyncIterator
This wrapper generalizes our implementation. RequestBody.AsyncIterator
is the override point for using another implementation
typealias Element = ByteBuffer