Enumerationvapor 4.114.1Vapor
HTTPBodyStreamStrategy
Determines how an incoming HTTP request’s body is collected.
enum HTTPBodyStreamStrategy
Determines how an incoming HTTP request’s body is collected.
enum HTTPBodyStreamStrategy
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.
case stream
The HTTP request’s body will not be collected first before the route handler is called and will arrive in zero or more chunks.
case collect(maxSize: ByteCount?)
The HTTP request’s body will be collected into memory before the route handler is called.
protocol Sendable
static var collect: HTTPBodyStreamStrategy { get }
The HTTP request’s body will be collected into memory up to a maximum size before the route handler is called. The application’s configured default max body size will be used unless otherwise specified.