async function httpLoader(url, options) {
  const opt = extend({}, this.options.http, options),
        type = options && options.response,
        response = await fetch(url, opt);

  return !response.ok
    ? error(response.status + '' + response.statusText)
    : isFunction(response[type]) ? response[type]()
    : response.text();
}
An http loader.
@param {string} url - The url to request.
@param {Partial<RequestInit>} options - An options hash.
@return {Promise} - A promise that resolves to the file contents.