I am creating an app to control my smarthome devices. My smarthome runs on the basis of openhab. To switch smarthome devices and query their status openhab provides a rest api.
For the HTTP requests I used this plugin:
So there are no problems with CORS.
Switching the devices or initial requesting the status of a device works fine.
Openhab also provides a SSE. You can subscribe to it via an event source. This way you always get automatically status changes of the devices.
With Openhab you have to authenticate with the basic variant.
There I already encounter the first problem. To subscribe to the event bus my request looks like this:
But Chrome forbids this variant. See image.
However, I don’t know of any other variant to send this information with an event source.
Does anyone know of a variant in an Ionic app, perhaps with a plugin, to subscribe to such an SSE? Also that no CORS problems arise.