Skip to content

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

Protocol

RequestBodyReader

Reads an HTTP request body, pulled straight off the connection with backpressure (the server stops reading until the handler asks for more). Implementations come from the HTTP server layer.
protocol RequestBodyReader : ~Escapable

Overview

Non-escapable: valid only for the duration of the withReader(_:) closure it was lent to, so the body can’t be read after the request moved on and “read it twice” is a compile-time error.

Topics

Instance Methods