{"library":"fetch-sse","type":"library","category":null,"description":"A lightweight library (v1.2.1) that provides an easy API for consuming Server-Sent Events (SSE) using the Fetch API, with full support for browsers and Node.js (>=18). It offers a single main function `fetchEventData` with familiar fetch-like options, including custom headers, method, body, signal, and event callbacks (onMessage, onOpen, onClose, onError). Key differentiators: no dependencies, TypeScript-first, supports POST requests and custom status handling via `skipStatusCheck`. Regular releases, actively maintained on GitHub.","language":"javascript","status":"active","version":"1.2.1","tags":["javascript","SSE","Server-Sent","Events","EventSource","fetch","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install fetch-sse","imports":["import { fetchEventData } from 'fetch-sse'","import { ServerSentEvent } from 'fetch-sse'","import { IFetchOptions } from 'fetch-sse'"]},{"cmd":"yarn add fetch-sse","imports":[]},{"cmd":"pnpm add fetch-sse","imports":[]}],"homepage":"https://github.com/yokingma/fetch-sse#readme","github":"https://github.com/yokingma/fetch-sse","docs":null,"changelog":null,"pypi":null,"npm":"fetch-sse","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}