blitz_api
blitz_api copied to clipboard
use websockets instead of sse
Advantages:
- better integration with FastAPI https://fastapi.tiangolo.com/advanced/websockets/
- Authentication would be easier without workarounds
- no limitation on connection when not on HTTP/2 (see https://developer.mozilla.org/en-US/docs/Web/API/EventSource)
- Also possible to send messages directly (e.g. when forcing an update, getting other messages)