XMLHttpRequest Level 2 Ajax library, xhr2-lib

Posted on January 22, 2012 by Phil   2 comments

So a while ago a messed about with the File API and FormData with the XMLHttpRequest Level 2 spec which enables the transfer of binary data and tracking of the upload progress through the XMLHttpRequestUpload object – awesome. I was blown away when I first started messing about with this stuff and support for it now seems to be a little more wide spread, nothing in IE or Opera as of yet but you know life goes on. What I did start to do was abstract some of the code I was messing about with into a little module aptly named xhr2-lib which I’ve grown a bit since and would like to share and hopefully get some feedback.

This micro library follows the example of the jQuery Ajax api with many of the same function names, I’m not suggesting it is anywhere near as comprehensive but I wanted a familiar set of tools to work with. I have put in the short cut methods like .getJSON and .post and am at the stage now of fleshing out the core and adding some tests and examples. Please check out the code and documentation on Github for now and I will add some demos here over the coming couple of weeks.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recommended reading

  • Ben Nadel Articles on “obsessively thorough web development” with Coldfusion and jQuery
  • Christian Heimann's blog – Wait till I come!! Articles on web development
  • David Walsh Articles around PHP, CSS, MooTools, jQuery and just about everything else
  • John Resig Javascript programmer and the creator of the jQuery library
  • Mary Lou (Codrops) Stunning designs with lots of cool jQuery effects

Photostream

  • Loading photostream from Flickr...