Skip to content

HttpStreamingClientService

Optional host capability for HTTP responses that must be consumed while they are still arriving — the transport requirement behind Mode 2 streaming over the network (for example server-sent events).

It is a separate service rather than a method on HttpClientService because it is genuinely optional: a host that cannot stream simply omits it, and providers report that as streamingAvailable: false in their dynamic capabilities, which the route planner turns into an inspectable streaming_unavailable rejection.

stream(request, signal?): Promise<HttpStreamResponse>

Dispatches a normalized HTTP request and resolves once the response head is available, leaving the body to be consumed incrementally.

HttpRequest.timeoutMs bounds the wait for the response head only — the time to first byte. It cannot bound total duration, since a stream is open-ended by nature; use signal to stop a stream that runs too long.

HttpRequest

Normalized HTTP request payload.

AbortSignalLike

Optional caller-driven cancellation. Aborting it must tear down the underlying connection and cause the body iterator to stop.

Promise<HttpStreamResponse>