• Creates a response for a streaming request. The response does not buffer the body. Each read hands out the next chunk from the source iterator. The body does not enforce a consumer lock: every getReader, text, and json call reads from the same iterator, so the caller uses one consumer per response. The cancel methods on the body and the reader call every release function the source provides: they destroy the source when it has a destroy method, and they also call the iterator's return method when one exists. The body passes through as-is, so the caller decodes any content encoding first.

    Parameters

    • source: StreamingResponseSource

      The raw platform response, for example a Node IncomingMessage. A missing status code maps to 0, and a missing status message maps to an empty string.

    Returns StreamingResponse

Generated using TypeDoc