Streaming responses
Streaming responses: Server-Sent Events, NDJSON, chunked transfer, byte drip and a streamed JSON array. Response buffering is disabled and every event is flushed, so clients see data as it is produced. Every stream stops as soon as the client disconnects.
- GET
https://api.testingapis.com/api/stream/chunked/{n}Send a plain-text response in chunked transfer encoding. - GET
https://api.testingapis.com/api/stream/dripDrip bytes slowly over a duration. - GET
https://api.testingapis.com/api/stream/json-array/{n}Stream a JSON array one element at a time. - GET
https://api.testingapis.com/api/stream/ndjson/{n}Stream newline-delimited JSON, one object per line. - GET
https://api.testingapis.com/api/stream/sseStream Server-Sent Events. - GET
https://api.testingapis.com/api/stream/sse/stockStream a deterministic stock ticker as Server-Sent Events.
Example request
Drip bytes slowly over a duration. Full reference and a Send button.
cURL
curl -X GET "https://api.testingapis.com/api/stream/drip?durationMs=500&bytes=5"Response · 200 OK
<binary body: 5 bytes, application/octet-stream>For curl, fetch, Python and test-suite examples against these streams, see how to test Server-Sent Events.