Skip to content

feat(fromFetch): add Server-Sent Events supports#7589

Open
kingcean wants to merge 1 commit intoReactiveX:masterfrom
kingcean:dev
Open

feat(fromFetch): add Server-Sent Events supports#7589
kingcean wants to merge 1 commit intoReactiveX:masterfrom
kingcean:dev

Conversation

@kingcean
Copy link

@kingcean kingcean commented Jan 4, 2026

Description:

Extends fromFetch function to enable Server-Sent Events.

import { fromFetch } from 'rxjs/fetch';

// URL_WITH_STREAM_MODE = "…";
// REQUEST_BODY = {…};

const data$ = fromFetch(URL_WITH_STREAM_MODE, {
  selector: 'sse'
  method: "POST",
  body: JSON.stringify(REQUEST_BODY),
  mode: "cors",
  credentials: "include",
  headers: {
    "Content-Type": "application/json",
    "Accept": "text/event-stream, application/json"
  },
});

data$.subscribe({
  next: result => console.log(result),
  complete: () => console.log('done')
});

Related issue:

Discussion #7584

@ak95asb
Copy link

ak95asb commented Feb 23, 2026

Hi I am new here and as of 23 Feb 26 and as of 5:49 am GMT there are a few checks that haven't been completed yet.

Node 18 build Expected — Waiting for status to be reported - Required
Node 20 build Expected — Waiting for status to be reported - Required
ts@latest (20) Expected — Waiting for status to be reported - Required

what's that about in general?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants