aboutsummaryrefslogtreecommitdiff
path: root/src/js/arching-kaos-fetch.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/arching-kaos-fetch.js')
-rw-r--r--src/js/arching-kaos-fetch.js18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/js/arching-kaos-fetch.js b/src/js/arching-kaos-fetch.js
index a29a5ae..656cbe0 100644
--- a/src/js/arching-kaos-fetch.js
+++ b/src/js/arching-kaos-fetch.js
@@ -1,20 +1,4 @@
function archingKaosFetchJSON( url, callback, params ){
-// fetch(url, {
-// method:'GET',
-// headers:{
-// Accept: 'application/json'
-// }
-// }).then(response=>{
-// if(response.ok){
-// response.json().then(json=>{
-// callback(json);
-// })
-// } else {
-// if (DEBUG) console.log(e);
-// }
-// }).catch( e=>{
-// if (DEBUG) console.log(e);
-// })
const request = new XMLHttpRequest();
request.addEventListener("load", ()=>{
var json = JSON.parse(request.response);
@@ -54,7 +38,7 @@ async function archingKaosFetchText( url, callback ){
return callback(text);
})
} else {
- if (DEBUG) console.log(e);
+ console.log(e);
}
})
}