src/loader.js
function http(url, options) {
  return request(url, extend({}, this.options.http, options))
    .then(function(response) {
      if (!response.ok) throw response.status + '' + response.statusText;
      return response.text();
    });
}
function http(url, options) {
  return request(url, extend({}, this.options.http, options))
    .then(function(response) {
      if (!response.ok) throw response.status + '' + response.statusText;
      return response.text();
    });
}
function http ( url , options ) { return request ( url , extend ( { } , this . options . http , options ) ) . then ( function ( response ) { if ( ! response . ok ) throw response . status + '' + response . statusText ; return response . text ( ) ; } ) ; }
HTTP request loader.
@param {string} url - The url to request.
@param {object} options - An options hash.
@return {Promise} - A promise that resolves to the file contents.
HTTP request loader .