# Azure/fetch-event-source

A better API for making Event Source requests, with all the features of fetch()

Repository: https://github.com/Azure/fetch-event-source
Canonical: https://ross.abutalabs.com/products/fetch-event-source
Language: TypeScript
License: MIT
License Family: permissive
Topics: server-sent-events, eventsource
Last push: 2026-02-28T08:47:04+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 69, release rhythm 8, longevity 100
- inputs: {"age_days": 2208, "days_push": 186, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2870, forks 195 (observed 2026-08-28T04:07:27.075206+00:00)

## What it is
A TypeScript library providing a fetch()-based alternative to the browser's native EventSource API for consuming server-sent events. It removes EventSource restrictions by supporting custom methods, headers, request bodies, and full control over retry strategies.

## Use cases
- consume server-sent events with POST requests and custom headers
- stream LLM token responses over SSE in a web app
- implement custom reconnection logic for dropped SSE connections
- pause SSE connections when the browser tab is hidden
- parse event streams behind API gateways with error handling

## When to avoid
- you only need simple GET-based SSE with default browser behavior
- you need bidirectional streaming like WebSockets
- you are not in a fetch-capable environment

## Facets
- artifact type: library
- maturity: stable
- function: http-client, websocket
- domain: web-development, frontend, apis
- platform: browser, cross-platform
- tags: server-sent-events, eventsource, fetch-api, sse-client, streaming, nodejs

## Member repositories
- Azure/fetch-event-source (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:27.075206+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:48:28.050308+00:00, confidence not recorded.
  - readme: https://github.com/Azure/fetch-event-source (fetched 2026-08-28T04:07:27.075206+00:00, sha d16929d83a6c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
