Skip to main content

Function: processReadableStream()

function processReadableStream(readableStream: ReadableStream<any>, onProgress?: OnProgressCallback): Promise<Results>

Parse a ReadableStream of Server-Sent-Events and return the results.

Parameters

ParameterTypeDescription

readableStream

ReadableStream<any>

A ReadableStream of Server-Sent-Events

onProgress?

OnProgressCallback

A callback to be called with the current state of the session

Returns

Promise<Results>

A promise that resolves to the final results of the session