Re: =[xhr]

We're adding Streams API <https://streams.spec.whatwg.org/> based response
body receiving feature to the Fetch API

See
- https://github.com/slightlyoff/ServiceWorker/issues/452
- https://github.com/yutakahirano/fetch-with-streams

Similarly, using WritableStream + Fetch API, we could allow for sending
partial chunks. It's not well discussed/standardized yet. Please join
discussion there.

Takeshi

On Sat, Nov 15, 2014 at 3:49 AM, Rui Prior <rprior@dcc.fc.up.pt> wrote:

> AFAIK, there is currently no way of using XMLHttpRequest to make a POST
> using Transfer-Encoding: Chunked.  IMO, this would be a very useful
> feature for repeatedly sending short messages to a server.
>
> You can always make POSTs repeatedly, one per chunk, and arrange for the
> server to "glue" the chunks together, but for short messages this
> process adds a lot of overhead (a full HTTP request per chunk, with full
> headers for both the request and the response).  Another option would
> using websockets, but the protocol is no longer HTTP, which increases
> complexity and may bring some issues.
>
> Chunked POSTs using XMLHttpRequest would be a much better option, were
> they available.  An elegant way of integrating this feature in the API
> would be adding a second, optional boolean argument to the send()
> method, defaulting to false, that, when true, would trigger chunked
> uploading;  the last call to send() would have that argument set to
> true, indicating the end of the object to be uploaded.
>
> Is there any chance of such feature getting added to the standard in the
> future?
>
> Rui Prior
>
>
>

Received on Monday, 17 November 2014 14:34:03 UTC