andywer / andywer/http-event-stream

Allow passing custom Last-Event-Id

Abierto
#7 1 comentario 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
TypeScript
Estrellas
20
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.