Mocking SSE and Streaming APIs with Mockifyer
Record chunk timelines for SSE and chunked HTTP bodies with fetch, keep concatenated response.data for compatibility, and replay a paced ReadableStream with original, accelerated, or immediate modes.
Record with a Tee, Replay with Timing
When a live response is text/event-stream or chunked without Content-Length, Mockifyer tees the body: your caller still gets the live ReadableStream while a background branch timestamps chunks until EOF or byte/duration caps. Caps set truncated; the mock file is saved after the stream ends or a cap is hit.
Configure streamReplay (accelerated default), streamRecordMaxBytes, and streamRecordMaxDurationMs on setupMockifyer. Drift uses capped reads and compares concatenated data. The dashboard shows a chunk timeline; MCP summaries avoid dumping full bodies. Recording is direct-mode only — proxy can replay stream mocks but does not record them yet.