swannodette/async-tests — pull request #6 by pangloss (2013-07-16 07:58:10+00:00)
Title: Created an XHR example.

I built this from an XHR lib that I've been using internally together with the redlobster promises library and adapted it to use core.async instead.

My goals were:

* preserve the excellent error handling that I had with promises
* make requests user-cancellable
* support core.async timeouts
* allow chained transformations while preserving request info & cancel-ability (chain & chaincat)
* let the request object be used directly as a read channel

I also have in the back of my mind to be able to switch seamlessly between xhr and websockets, though I haven't experimented with that yet.

I'm not sure if it is a good idea to feed the data through the channel one record at a time.

I'm happy to tweak / rewrite as needed while I get a feel for this excellent library.