Enumeration
BodySizeLimit
How much of a request body
collect(max:) and its relatives will buffer.enum BodySizeLimit
Overview
Bodies are lazy: nothing is held in memory until something asks for it, and this is the ceiling that applies when it does. Both literal forms of ByteCount work directly, so the common cases need no case name:
try await req.body.collect() // .default
try await req.body.collect(max: "1mb") // .specified
try await req.body.collect(max: 4096) // .specified
Topics
Enumeration Cases
case `default`Whatever ceiling is configured for the body being read.case specified(ByteCount)An explicit ceiling, regardless of what the request or the application is configured for.case unlimitedNo ceiling: buffer the body however large it turns out to be.
Default Implementations
Relationships
Conforms To
Swift.CopyableSwift.EquatableSwift.EscapableSwift.ExpressibleByExtendedGraphemeClusterLiteralSwift.ExpressibleByIntegerLiteralSwift.ExpressibleByStringLiteralSwift.ExpressibleByUnicodeScalarLiteralSwift.SendableSwift.SendableMetatype