http-event-stream icon indicating copy to clipboard operation
http-event-stream copied to clipboard

Allow passing custom Last-Event-Id

Open andywer opened this issue 6 years ago • 0 comments

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.

andywer avatar Aug 29 '19 07:08 andywer