Polyman Documentation - v3.1.0
    Preparing search index...
    • Reads SSE events from a response body, in order.

      • Lines may end in \n, \r\n or \r, and may be split across reads.
      • One read may hold several events.
      • Comment lines (: ...) are skipped. Providers use them as keep-alives.
      • A blank line ends an event. An event with no data: line is skipped.
      • The last event is still given when the body ends without a blank line.

      Payloads such as [DONE] are given as normal data. The caller decides when to stop. Stopping early (a break in for await) cancels the body. Aborting signal cancels the body and throws the abort reason.

      Parameters

      • body: ReadableStream<Uint8Array<ArrayBufferLike>>
      • Optionalsignal: AbortSignal

      Returns AsyncGenerator<SseEvent>