basalt / http/src / openStreamPump
Function: openStreamPump()
> openStreamPump(source): Promise<{ first: Uint8Array<ArrayBufferLike> | null; pump: StreamPump; }>
Defined in: http/src/stream.ts:237
Pulls the first chunk before any header is flushed, so a source that fails immediately (a deleted object, a refused S3 request) can still become a normal JSON error response instead of a truncated body. The source is released before the failure is rethrown.
Parameters
source
Returns
Promise<{ first: Uint8Array<ArrayBufferLike> | null; pump: StreamPump; }>