rdf-graph-store.js
/**
 provide a generic logging fetch operator.
 it passes the response to its continuation whether or not the status is 'ok',
 as well as continuing after logging an error.
 in cases where additional continuations are supplied, they will obtain this error
 eg:

   var p = new Promise(function(accept, reject) { accept("accepted"); })
    .then(function(first) {console.log("first", first); return(first);})
    .catch(function(caught){console.log("caught", caucht);})
    .then(function(last){console.log("finally", last);})
   var p = new Promise(function(accept, reject) { reject("rejected"); })
    .then(function(first) {console.log("first", first); return(first);})
    .catch(function(caught){console.log("caught", caught); return("caught")})
    .then(function(last){console.log("finally", last);})
 */
provide a generic logging fetch operator.
it passes the response to its continuation whether or not the status is 'ok',
as well as continuing after logging an error.
in cases where additional continuations are supplied, they will obtain this error
eg.


provide a generic logging fetch operator . it passes the response to its continuation whether or not the status is ' ok ' as well as continuing after logging an error . in cases where additional continuations are supplied they will obtain this error eg .
function logFetch(location, args) {
  console.debug('fetch:', location, args);
  var headers = args.headers;
  for (var [k,v] of headers.entries()) {console.debug('fetch:', [k,v])};
  var p = fetch(location, args);
  p.location = location;
  return (p);
}
function logFetch ( location , args ) { console . debug ( 'fetch:' , location , args ) ; var headers = args . headers ; for ( var [ k , v ] of headers . entries ( ) ) { console . debug ( 'fetch:' , [ k , v ] ) } ; var p = fetch ( location , args ) ; p . location = location ; return ( p ) ; }
provide a generic logging fetch operator.
provide a generic logging fetch operator .
// in order to see the header entries... /*  p = p.then(function(response) {
        if (response.ok) {
          return (response);
        } else {
          console.warb(`fetch failed: response: ${response.status}`);
          return (response);
        }
      }).catch(function(error) { console.warn("fetch failed: ", location, error); });
  // console.log(p);*/