Skip to content

Add turbostream decoding for data/actions #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ricardo-devis-agullo
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant