src/lib/methods/fetch.js
function fetch(store, key, url, options) {
  options = Object.assign({}, DEFAULT_LOAD_OPTIONS, options);
  options.cacheControl = parseCacheControl(options.cacheControl);

  if (!key) {
    return Promise.resolve({
      body: undefined,
      duration: 0,
      headers: {},
      key,
      status: 400
    });
  }

  return doFetch(store, key, url, options);
}
function fetch(store, key, url, options) {
  options = Object.assign({}, DEFAULT_LOAD_OPTIONS, options);
  options.cacheControl = parseCacheControl(options.cacheControl);

  if (!key) {
    return Promise.resolve({
      body: undefined,
      duration: 0,
      headers: {},
      key,
      status: 400
    });
  }

  return doFetch(store, key, url, options);
}
Fetch data. If expired, load from 'url' and store at 'key'
@param {DataStore} store
@param {String} key
@param {String} url
@param {Object} options
- {Boolean} abort
- {String} cacheControl
- {Boolean} ignoreQuery
- {Number} retry
- {Boolean} rejectOnError
- {Number} timeout
@returns {Promise<Response>}