Skip to content

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

Instance Method

forEachChunk(_:)

Drives the read loop for you, calling body with each chunk of the request body. This is what most streaming handlers want; it is a convenience over withReader(_:) and shares its semantics with forEachChunk(_:) (borrowed span, valid only for the call — copy out anything you keep).
consuming func forEachChunk(_ body: (Span<UInt8>) async throws -> Void) async throws