jsonpipe is a lightweight, standalone AJAX client for consuming chunked (Transfer-Encoding: chunked) JSON responses in the browser. Version 2.2.0 (latest) ships TypeScript types. It exposes a single `flow` function with an API similar to jQuery.ajax, but tailored for streaming JSON delimited by double newlines (`\n\n`). No dependencies, supports IE8+, and allows per-chunk callbacks. Differentiators: minimal footprint, automatic delimiter-based JSON parsing, and configurable delimiter.
npm install jsonpipeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a streaming GET request that logs each JSON chunk as it arrives, along with error and completion handlers.
Set `delimiter` in the options object to the correct separator string.
Set `disableContentType: true` when sending non-string data.
Use in browser context only. For Node.js streaming, consider alternatives like `fetch` with ReadableStream.
Access individual header values via `headers['Content-Type']` or similar.
Use `const jsonpipe = require('jsonpipe'); jsonpipe.flow(...);` instead of `const { flow } = require('jsonpipe');`Ensure server sends valid JSON objects separated by `\n\n` and set the correct `delimiter` option if different.
Check server CORS headers and ensure `withCredentials` is used only if the server allows credentials.
No dependency data recorded yet.