Description
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.