I'm trying to create a subscribtion to monitor nodes via javascript using the /event endpoint in the datalayer rest interface.
The problem is that the /automation/api/v2/events/subID GET requires authorization headers and that is not supported in any browser
https://developer.mozilla.org/en-US/docs/Web/API/EventSource
So i googled for a polyfill that suppors it and found this one;
https://github.com/Yaffle/EventSource
The problem is that using this never returns any messages. It does recieve data continously (the size increases) so so far it does work.
Does anyone have a working example using this?
/Andreas