Skip to main content

Module streaming

Module streaming 

Source
Expand description

Streaming HTTP response bodies (feature #70).

A normal umbral handler returns a fully-buffered String / Html / Json. That’s fine for a page, but a 200 MB CSV export or a file download shouldn’t sit in memory all at once. StreamingResponse sends the body chunk-by-chunk from an async Stream, so memory stays flat regardless of payload size and the client starts receiving bytes before the last row is generated.

Pairs with AppBuilder::compression: a streamed body is gzip/brotli-compressed on the fly by the same layer, so ?format=csv over a million rows streams and compresses without buffering.

Structs§

StreamingResponse
A response whose body is produced incrementally from an async stream.