Re: [whatwg/fetch] Uploading a Request made from a ReadableStream body (#425)

In case abandoning this feature is being considered, I'd like to pile on a use case:

The existence of this API has implications for streaming media sourced from browsers and browser-like clients.  Without a way to make a simple HTTP PUT request with a stream from a browser, all of us working in this space have been hacking around the problem by proxying the stream data via Web Socket servers or repeatedly making requests with chunks every second or so.

For 20 years, we have been streaming media via HTTP PUT on the source end, and HTTP GET on the receiving end.  This works most everywhere, except for the source end on browsers, which is important.  Implementing ReadableStream as a request body would remove the need for a lot of hackarounds.

I suspect there are many others with different use cases who are generating data on-the-fly where a normal HTTP request would be more appropriate for sending data to the server.  In at least some of these use cases, we don't always have control over the servers, which already support HTTP and may not be able to support other protocols.  Please, when considering this stream-as-request-body feature, keep in mind that it goes far beyond file uploads.  And, thank you for your efforts!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/425#issuecomment-519979049

Received on Friday, 9 August 2019 16:19:07 UTC