0.0.4 • Published 5 months ago

fetch-sse-stream v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

fetch-sse-stream

A library for Server-Sent Events, like fetch.

Usage

import { fetchSseJsonStream } from 'fetch-sse-stream';

fetchSseJsonStream('https://api.openai.com/...', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
  },
  body: {
    stream: true,
    // ...
  },
  onData(data) {
    console.log(data);
  },
});
0.0.4

5 months ago

0.0.3

8 months ago

0.0.2

9 months ago

0.0.1

11 months ago