I'm a bit stumped. I've forgotten how to do this. I have a function called ext.get() that takes a parameter of url. It fetches a response from the url. The ext.get() function is meant to return the response as a json. I don't think it is doing that.
ext.get = (url) => {
let myHeaders = new Headers();
let options = {
method: 'GET',
headers: myHeaders,
mode: 'cors'
};
//fetch get
fetch(url, options).then(response => {
console.log(JSON.stringify(response.json()))
return JSON.stringify(response.json())
});
};