I ran into a problem where I'd like to connect to an Event Source which was behind an Endpoint that required Authorization.
So I added the optional headers attribute to the connect factory. It accepts a Map and merges all its entries with the already present headers of this library.
I ran into a problem where I'd like to connect to an Event Source which was behind an Endpoint that required Authorization.
So I added the optional
headers
attribute to the connect factory. It accepts aMap
and merges all its entries with the already present headers of this library.EventSource eventSource = await EventSource.connect( url, client: httpClient, headers: { "Authorization": "Bearer ..." }, );