You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request support for readable streams in CompanionHTTPResponse body.
After testing, the response body only contains the stream-object serialized to JSON (using Companion v3.4.3 & @companion-module/base v1.11.0).
Instead, I would like the stream-data to be piped into the response.
So some kind of alternative handling of responses with readable streams would be highly appreciated.
I have some use cases where I want to return certain data via "handleHttpRequest(request)" that I first need to get elsewhere - but this can take a moment sometimes.
For now, I return a ticket/id in the response to do interval-polling to get available data chunks assigned to that ticket/id, until a “completed” response is being received.
Of course I thought about websockets and even tested with webRTC data-channels. But I think readable streams via the already existing webserver of companion would be more suitable for this job.
The text was updated successfully, but these errors were encountered:
I am open to this, but it won't be particularly simple to achieve.
In between the module and the http server in companion is a layer of communication done over ipc. In the future, this could become some kind of tcp based protocol instead.
Meaning that to support this we would need to figure out a way of encoding this stream over this ipc/tcp, and implement it.
Perhaps this would be mitigated if the 5s timeout we currently impose on handleHttpRequest was higher, or could be configured in some way, or perhaps the module could inform companion on an interval 'Im still working on this'?
I would like to request support for readable streams in
CompanionHTTPResponse
body.After testing, the response body only contains the stream-object serialized to JSON (using Companion v3.4.3 & @companion-module/base v1.11.0).
Instead, I would like the stream-data to be piped into the response.
So some kind of alternative handling of responses with readable streams would be highly appreciated.
I have some use cases where I want to return certain data via "
handleHttpRequest(request)
" that I first need to get elsewhere - but this can take a moment sometimes.For now, I return a ticket/id in the response to do interval-polling to get available data chunks assigned to that ticket/id, until a “completed” response is being received.
Of course I thought about websockets and even tested with webRTC data-channels. But I think readable streams via the already existing webserver of companion would be more suitable for this job.
The text was updated successfully, but these errors were encountered: