request(url, type, withCredentials, headers) {
    if (this.online) {
      // From network
      return this.requester(url, type, withCredentials, headers).then(data => {
        // save to store if not present
        this.put(url);
        return data;
      });
    } else {
      // From store
      return this.retrieve(url, type);
    }
  }
Request a url
@param  {string} url  a url to request from storage
@param  {string} [type] specify the type of the returned result
@param  {boolean} [withCredentials]
@param  {object} [headers]
@return {Promise<Blob | string | JSON | Document | XMLDocument>}