Create a new instance of the StreamDataEventSource
prototype.
The StreamDataEventSource
is the main entry point for establishing Server Sent Event connection to a targeted JSON REST service URL.
Mandatory. The targeted REST URL is formatted as follow:
protocol://url(:port)(/localpath(?queryparameters))
Optional. Any specific headers that have to be added to the request. It must be an array with the following structure:['Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==']
Streamdata.io JavaScript SDK