Replies: 1 comment
-
I’m also keen for this that has a unconsumed body from a second server which it would be cool to pass off to directly a stream rather than consuming and then re-sending. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With SSR streaming, I'm trying to (transform and) stream JSON objects so that each JSON object is sent in its own HTTP streamed chunk.
Objects are returned in an array from an API. I'd like to use
JSON Stream
to slice objects from the array similarly to this example:I'm looking to emulate something visually similar to Suspense streaming.
Can the data loader or the fetcher stream the response from the loader by handling the HTTP
Response#body
property ?I tried several combinations, also with
defer
, but the best I can get from the data loader is a HTTPResponse#body
property but an unusable one (an empty object) when I pass aTransformStream.readable
object to the returnedResponse
in the loader.Can Remix handle streams between the loader and the function component ? How can Remix handle NDJSON or CSV so that each data entity (object, line, etc.) is sent in its own HTTP chunk instead of having the full array of objects sent (as seen with Wireshark when inspecting the TCP stream) ?
Beta Was this translation helpful? Give feedback.
All reactions