W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2014

[whatwg] Fetch API: HTTP Stream

From: Alexandre Morgaut <Alexandre.Morgaut@4d.com>
Date: Mon, 23 Jun 2014 13:36:07 +0200
To: WHATWG <whatwg@whatwg.org>, Anne van Kesteren <annevk@annevk.nl>
Message-ID: <02ECCD78-00B8-4654-B9B7-671066AAAE83@4d.com>

I occasionally have had to deal live XML feeds over HTTP
The server continuously sent HTTP chunks during the lifetime of the HTTP connection, meaning, until the client close the connection.

I used a SAX JS lib and, on readystate === 3,  had to continuously check body changes via a setInterval callback.
While the body started to be too big, I also had to create  a new request and close the previous one once the new connection was ready
(and of course I had to take care of potential duplicates)

Other Comet technics could have been used, but I already have hard time to get at least this option

Of course, today, I'd do my best to ask for Web Socket of Server-Sent Event alternatives, but I'm not sure I would have get it in the same situation.

With XHR2, I wondered if there could be a way to not full the body property but receive the content in some 'chunk' event.data property

I wonder now if such fetch API could be a better place to manage such use case


Alexandre Morgaut
Wakanda Community Manager

60, rue d'Alsace
92110 Clichy

Standard : +33 1 40 87 92 00
Email :    Alexandre.Morgaut@4d.com
Web :      www.4D.com

Received on Monday, 23 June 2014 11:36:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC