Skip to content
This repository was archived by the owner on Jul 25, 2026. It is now read-only.

Add turbostream decoding for data/actions - #124

Closed
ricardo-devis-agullo wants to merge 4 commits into
masterfrom
turbostream
Closed

Add turbostream decoding for data/actions#124
ricardo-devis-agullo wants to merge 4 commits into
masterfrom
turbostream

Conversation

@ricardo-devis-agullo

Copy link
Copy Markdown
Collaborator

This adds turbo-stream package for decoding streamed responses. It will be bundled and saved on oc._decode (only adds 2kb gzipped). Because it needs a ReadableStream, i'm adding a check for fetch available, so IE will still use $.ajax, and now when fetch is available calls will be done with fetch instead, so we can decode streams if the response has a content-type of x-text/stream. This makes it backwards compatible, as its up to the consumers if they want to create components that are streamed, and therefore modern browsers only. Old flow will still work as always.

Remaining PR is on oc, where it will do the encoding whenever the component asks to be streamed.

@ricardo-devis-agullo

Copy link
Copy Markdown
Collaborator Author

Closing stale PR on formerly-archived/moved repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant