Skip to content

Commit 5805915

Browse files
authored
Allow passing kwargs without specifying headers (#10)
Previously, passing any kwargs seemed to cause an error if a 'headers' parameter was not also provided. This small change ensures that the default behavior happens when kwargs is used.
1 parent cd821f2 commit 5805915

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aiohttp_sse_client/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def __init__(self, url: str,
8888
self._orginal_reconnection_time = reconnection_time
8989
self._max_connect_retry = max_connect_retry
9090
self._last_event_id = ''
91-
self._kwargs = kwargs or {'headers': MultiDict()}
91+
self._kwargs = kwargs
92+
if 'headers' not in self._kwargs:
93+
self._kwargs['headers'] = MultiDict()
9294

9395
self._event_id = ''
9496
self._event_type = ''

0 commit comments

Comments
 (0)