const getCat = () => {
const img = document.createElement('img');
img.classList.add('cat__img');
fetch('https://cataas.com/cat')
.then(response => response.blob())
.then(blob => {
img.src = URL.createObjectURL(blob);
});
return img
}
const options ={
headers: {
"Cache-Control":" no-cache",
"Pragma":" no-cache"
}
};
const getCat = () => {
const img = document.createElement('img');
img.classList.add('cat__img');
fetch('https://cataas.com/cat', options);
.then(response => response.blob())
.then(blob => {
img.src = URL.createObjectURL(blob);
});
return img
}