Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion aiohttp_sse_client2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def __init__(self, url: str,
on_open=None,
on_message=None,
on_error=None,
last_event_id: str = '',
**kwargs):
"""Construct EventSource instance.

Expand All @@ -79,6 +80,8 @@ def __init__(self, url: str,
:param on_open: event handler for open event
:param on_message: event handler for message event
:param on_error: event handler for error event
:param last_event_id: specifies the last event ID string of the
EventSource object
:param kwargs: keyword arguments will pass to underlying
aiohttp request() method.
"""
Expand All @@ -99,7 +102,7 @@ def __init__(self, url: str,
self._reconnection_time = reconnection_time
self._orginal_reconnection_time = reconnection_time
self._max_connect_retry = max_connect_retry
self._last_event_id = ''
self._last_event_id = last_event_id
self._kwargs = kwargs
if 'headers' not in self._kwargs:
self._kwargs['headers'] = MultiDict()
Expand Down