DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Transfer Binary Data and Track Upload Progress with a New XMLHttpRequest Level 2 Ajax library, xhr2-lib

Transfer Binary Data and Track Upload Progress with a New XMLHttpRequest Level 2 Ajax library, xhr2-lib

Phil Parsons user avatar by
Phil Parsons
·
Mar. 06, 12 · Web Dev Zone · Interview
Like (0)
Save
Tweet
5.75K Views

Join the DZone community and get the full member experience.

Join For Free

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.

View on Github

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.

Data (computing) Upload Transfer (computing) Library

Published at DZone with permission of Phil Parsons, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • API Security Tools: What To Look For
  • Spring, IoC Containers, and Static Code: Design Principles
  • How To Check for JSON Insecure Deserialization (JID) Attacks With Java
  • On Architects, Architecture, and Failures

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo