Skip to content

feat: support setting lastEventId on EventSource initialization to pass header on initial connection#82

Open
tristenhester wants to merge 1 commit intobinaryminds:masterfrom
tristenhester:feat-support-last-event-id-on-initialization
Open

feat: support setting lastEventId on EventSource initialization to pass header on initial connection#82
tristenhester wants to merge 1 commit intobinaryminds:masterfrom
tristenhester:feat-support-last-event-id-on-initialization

Conversation

@tristenhester
Copy link

To support implementations where lastEventId is tracked outside of the EventSource instance, support functionality to initialize the EventSource class while specifying the Last-Event-ID request header sent on initial connection.

This PR adds lastEventId to EventSourceOptions to support setting EventSource.lastEventId within the EventSource constructor. If lastEventId is not provided in EventSourceOptions, default to null to maintain existing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant