source = new EventSource("stream");
This is how I connect to server pushing streaming data, Now my scenario is to send an extra string while making the connection. how do I achieve this ?
I am sure that I dont find any details about this on articles in internet !!
Anyone help!
Since SSE just use normal HTTP URLs, you should be able to just add GET arguments when you initiate the connection.
source = new EventSource("http://example.com/sse?arg=value");
On the server side you would look for the 'arg' key in the params.