Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

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

Default Implementations

Relationships

Conforms To

  • Swift.Copyable
  • Swift.Equatable
  • Swift.Escapable
  • Swift.ExpressibleByExtendedGraphemeClusterLiteral
  • Swift.ExpressibleByIntegerLiteral
  • Swift.ExpressibleByStringLiteral
  • Swift.ExpressibleByUnicodeScalarLiteral
  • Swift.Sendable
  • Swift.SendableMetatype