Skip to content

HttpStreamResponse

A streamed HTTP response: the status line and headers are resolved first, and the body is delivered incrementally as raw byte chunks.

The head is deliberately separated from the body so a caller can classify a non-2xx response (mapping it through the normal HTTP error taxonomy) before deciding to interpret the body as a protocol stream. Chunk boundaries are transport artifacts and carry no meaning: a chunk may split a protocol frame or even a multi-byte UTF-8 sequence, so consumers must buffer and decode incrementally rather than treating a chunk as a unit.

body: AsyncIterable<Uint8Array<ArrayBufferLike>>

The response body as an incremental sequence of raw byte chunks. Iterating it to completion, or abandoning it, releases the underlying connection.


headers: Record<string, string>

Response headers, with lower-cased names.


status: number

HTTP status code.


statusText: string

HTTP status text.