Respuestas en streaming
Respuestas en streaming: Server-Sent Events, NDJSON, transferencia chunked, goteo de bytes y un array JSON en streaming. El buffering de respuestas está desactivado y cada evento se envía al momento, así que los clientes ven los datos según se producen. Cada stream se detiene en cuanto el cliente se desconecta.
Tu cuenta desbloquea estos endpoints. Usa Try it en la página de cada endpoint para enviar peticiones.
Estos endpoints necesitan una cuenta gratuita. Crea una o inicia sesión para ver sus detalles y probarlos aquí.
- GET
https://api.testingapis.com/api/stream/chunked/{n}Send a plain-text response in chunked transfer encodingSend a plain-text response in chunked transfer encoding. - GET
https://api.testingapis.com/api/stream/dripDrip bytes slowly over a durationDrip bytes slowly over a duration. - GET
https://api.testingapis.com/api/stream/json-array/{n}Stream a JSON array one element at a timeStream a JSON array one element at a time. - GET
https://api.testingapis.com/api/stream/ndjson/{n}Stream newline-delimited JSON, one object per lineStream newline-delimited JSON, one object per line. - GET
https://api.testingapis.com/api/stream/sseStream Server-Sent EventsStream Server-Sent Events. - GET
https://api.testingapis.com/api/stream/sse/stockStream a deterministic stock ticker as Server-Sent EventsStream a deterministic stock ticker as Server-Sent Events.
Petición de ejemplo
Drip bytes slowly over a duration. Referencia completa y botón Send (en inglés).
curl -X GET "https://api.testingapis.com/api/stream/drip?durationMs=500&bytes=5"<binary body: 5 bytes, application/octet-stream>Inicia sesión para ver los detalles
Los parámetros, los ejemplos de petición y respuesta y el panel Try it en vivo de estos endpoints son para miembros con sesión iniciada. Las cuentas son gratuitas y se crean en unos segundos.