mirror of
https://github.com/kennethreitz/responder.git
synced 2026-07-21 18:39:29 +00:00
38c4eb4438
- resp.sse: JSON-encode dict/list data, comment frames ({"comment": ...}),
bytes passthrough, opt-in heartbeat= keepalive (queue+task merge so the
producer isn't cancelled mid-event), X-Accel-Buffering: no, and the
@resp.sse(heartbeat=...) decorator form. Refactored to _sse_frame /
_format_sse_event / _sse_with_heartbeat helpers.
- req.last_event_id exposes the Last-Event-ID header for stream resume.
- Docs + tests.
Backwards-compatible. 553 tests pass; ruff + mypy clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>