lib/plugins/XMLHttpRequestPlugin.js
function readFileAsync (args) {
    var file = args.file;
    var config = args.config;
    var next = args.next;

    safeCall(sendRequest, false, file.url, config, function handleResponse (err, res) {
      if (err) {
        next(err);
      }
      else {
        setHttpMetadata(file, res);
        next(null, res.data);
      }
    });
  }
function readFileAsync (args) {
    var file = args.file;
    var config = args.config;
    var next = args.next;

    safeCall(sendRequest, false, file.url, config, function handleResponse (err, res) {
      if (err) {
        next(err);
      }
      else {
        setHttpMetadata(file, res);
        next(null, res.data);
      }
    });
  }
function readFileAsync ( args ) { var file = args . file ; var config = args . config ; var next = args . next ; safeCall ( sendRequest , false , file . url , config , function handleResponse ( err , res ) { if ( err ) { next ( err ) ; } else { setHttpMetadata ( file , res ) ; next ( null , res . data ) ; } } ) ; }
Asynchronously downlaods a file.

@param {File} args.file - The {@link File} to read
@param {function} args.next - Calls the next plugin, if the file is not a local filesystem file
Asynchronously downlaods a file .