Commit e4ae9157 authored by Michał "rysiek" Woźniak's avatar Michał "rysiek" Woźniak 🔒
Browse files

WIP #71: fetch now uses self.log

parent 51a2c2f1
......@@ -26,7 +26,7 @@
* getting content using regular HTTP(S) fetch()
*/
let fetchContent = (url) => {
console.log('Samizdat: regular fetch!')
self.log(config.name, `regular fetch: ${url}`)
return fetch(url, {cache: "reload"})
.then((response) => {
// 4xx? 5xx? that's a paddlin'
......@@ -35,7 +35,7 @@
throw new Error('HTTP Error: ' + response.status + ' ' + response.statusText);
}
// all good, it seems
console.log("(COMMIT_UNKNOWN) Fetched:", response.url);
self.log(config.name, `fetched successfully: ${response.url}`);
// we need to create a new Response object
// with all the headers added explicitly,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment