Streaming from Firebase REST API with Web component?

I am having a look at streaming changes using the Firebase REST api.
The prerequisites, as can be seen in the links below are:

  1. Header to accept text/event-stream
  2. Allowing / handling redirects for 307

https://firebase.google.com/docs/reference/rest/database#section-streaming

This works fine using curl in a terminal on my computer, as I change the value of "fnum" it updates:

~$ curl --header "Accept: text/event-stream" https://ai2webcomp-default-rtdb.europe-west1.firebasedatabase.app/fnum.json
event: put
data: {"path":"/","data":675}

event: put
data: {"path":"/","data":73}

event: keep-alive
data: null

event: put
data: {"path":"/","data":960}


Attempting the same with a web component, fails to return anything at all:

fbDataChangedStream.aia (2.9 KB)

If you change "Accept" to "Content-Type" you should get a response, but it does not open the stream, so doesn't update when the counter is changed.

Note, I am using a separate web component, Web2, (from the one used to set the value, Web1) to fetch the stream

My guess is that the web component cannot handle the redirect or is unable to maintain an open stream ?

I've logged a feature request on GitHub. Possibly an external contributor could pick it up and implement it for Android and iOS.

OK, thank you.

I have created a workaround using a webviewer (html/javascript) for both insecure and secure rules for the time being.