stream(length:_:)

Create and stream body using StreamWriter.

HTTPHandler.swift:159
@preconcurrency static func stream(length: Int? = nil, _ stream: @escaping (StreamWriter) -> EventLoopFuture<Void>) -> Body

Parameters

length

Body size. If nil, Transfer-Encoding will automatically be set to chunked. Otherwise a Content-Length header is set with the given length.

stream

Body chunk provider.