function httpLoader(fetch) {
    return fetch ? async function (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();
    } : httpReject;
  }
HTTP request handler factory.
@param {function} fetch - The Fetch API method.
@return {function} - An http loader with the following signature:
  param {string} url - The url to request.
  param {object} options - An options hash.
  return {Promise} - A promise that resolves to the file contents.