Skip to content

HttpOutgoingBody

HttpOutgoingBody = Uint8Array | ReadableStream<Uint8Array>

Defined in: packages/net-http/src/message/http-message.ts:87

A body to send: bytes already in hand, or a stream produced while sending.

A Uint8Array is sent with its length declared. A stream is sent with the length its Content-Length field declares — the stream must then produce exactly that many bytes — or, without one, with chunked coding on HTTP/1.1 and DATA frames on HTTP/2 and HTTP/3.