-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Streaming support #198
Comments
There are no current plans for streaming requests or responses. We are limited by what XMLHttpRequest supports. There is a draft specification for streams in the Fetch API, with a native implementation shipping in Chrome already. |
Please reopen, there are two was you can get a stream from XMLHttpRequest. xhrRequest.responseType = "ms-stream";
// or
xhrRequest.responseType = "moz-chunked-arraybuffer"; If this would be implemented then i would rather want to use the polyfill then firefox or edge partially supported fetch api |
Sure, let's revisit this. But I make no promises about actually implementing this in github/fetch. It sounds like we can get native streaming from Chrome 43+, and streaming via XHR in IE and Firefox. How about Safari— is anything available there? |
Like i said to jonnyreeves/chunked-request
I created it yesterday, maybe it would be of any interest? |
Borrow some info from jonnyreeves/chunked-request#16
They also utility a partial request method (making multiple range request) Perhaps this would be a solution or just make it overkill |
if this gets implemented the we can't use this code any longer if (self.fetch) {
return
} Cuz with streams i think the polyfill would actually be better then the partial fetch api FF & Edge supports |
Oh, and by the way. |
Even if XMLHttpRequest can't really do streams, I think it would be great to have https://github.com/domenic/streams-demo working on old browsers, with only one chunk, and by adding a |
@jimmywarting I'm not sure if this is still a concern, but the workaround method for a bad FileReader might also work to allow this polyfill to override a native implementation so you can keep your preferred streaming when browsers only offer partial support. |
this project probably deserves to be looked at too |
This comment has been minimized.
This comment has been minimized.
still no stream support? |
Still no streaming support, and I think that it's safe to decide at this point that this polyfill will never have streaming support. This polyfill has been feature-complete for a while (i.e. has all the features implemented that cover most common usages of If your app really needs streaming, feature-detect it and use native browser capabilities. When streaming capabilities are not present (e.g. when this polyfill is being used in old browsers), your app should gracefully fall back to regular request/response reading. |
Is there any plans to add support for streaming, something like what request has?
The text was updated successfully, but these errors were encountered: