andywer / andywer/http-event-stream
Allow passing custom Last-Event-Id
- Linguagem predominante
- TypeScript
- Estrelas
- 20
- Forks
- 2
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Add an option `lastEventId` to `EventStreamOptions`, so the application can pass a custom last event ID.
This is important to have, so that a user can specify a last event ID per query parameter or similar, since the native DOM `EventSource` does not allow customizing the `Last-Event-Id` header.
Use case: The user wants to stream data from a certain point onwards (e.g. the last time they were online) when opening the stream. The `Last-Event-Id` header is only automatically set when reconnecting an already open stream that had some connectivity issue.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.