# parseSSE

<!-- https://uncage.vercel.app/docs/api/client/functions/parsesse/ -->

```ts
function parseSSE(stream, signal?): AsyncIterable<SSEFrame>;
```

Defined in: client/src/sse.ts:78

Parses a text/event-stream body. Decodes with `stream: true` so multi-byte characters split
across chunks stay intact. Aborting `signal` cancels the body, even when the fetch that made it
ignores aborts (a stream torn down while a mobile app was in the background never ends otherwise).

## Parameters

| Parameter | Type |
| ------ | ------ |
| `stream` | `ReadableStream`\<`Uint8Array`\<`ArrayBufferLike`\>\> |
| `signal?` | `AbortSignal` |

## Returns

`AsyncIterable`\<[`SSEFrame`](https://uncage.vercel.app/docs/api/client/interfaces/sseframe.md)\>
