My Library Docs

Multi-root Sidebar

flex-layout

  • Getting Started

  • Guides

  • Reference

typed-rx-http

  • Getting Started

  • Guides

  • Reference

global-rx-state

  • Getting Started

  • Guides

  • Reference

webflux-fe-dev-assistant

reactive-mongo-dsl

Streaming & Upload

Core's callApiStream reads NDJSON responses as line-by-line JSON and emits them in order from the Observable.


Direct usage of callApiStream in Core.

Use callApiStream when the server returns NDJSON (one JSON per line). If the Accept header is not present, it defaults to application/x-ndjson, and other media types can be overridden with per-request headers.

ts
NDJSON response format.
text

callApiStreamSplits the response based on line breaks and parses each line as JSON. It expects NDJSON, not the standard SSE data: frame format.

Observable subscription and unsubscription.
tsx

Calling unsubscribe() will also cancel the internal ReadableStream reader. Unsubscribe in React effects or cleanup tasks.

Optional: Use the generated stream service.

In projects using the OpenAPI generator, you can make the generated service call callApiStream for the stream endpoint. It can be imported and subscribed to in the same way as a regular generated service.

tsx
uploadFile: PUT file to specified URL.
uploadFile.ts
ts
© 2026 Byeolnaerim. All rights reserved.IntroductionPrivacy Policy