Server streaming sends generated data incrementally instead of buffering the complete result. For a CSV export, the server can read orders in bounded batches or through a cursor and write rows directly to the HTTP response, avoiding a full dataset in memory. section 4.1.4
Listing 4.4 Spec file
Accept: GET /api/orders/export (authenticated user) Return: CSV file with columns: order_id, date, total, status Filter: Only orders belonging to the requesting user Format: Standard CSV, UTF-8 encoding Never: Include other users' data, build the CSV in the browser, load all orders into memory, allow unauthenticated access Prefer: Stream CSV rows from the server using bounded database reads
The export spec makes streaming a design constraint: read bounded amounts from the database and never load all orders into memory. section 4.1.4

