JSFiddle - React, Tailwind, and code Playground
by lemon kazi
JavaScript
const fetchImage = async () => {
try {
/* const imageResponse = await fetch("https://d3l6kryugf7n55.cloudfront.net/uploads/images/user_icon/40/original_36353739626438356562663535.jpeg"); */
const imageResponse = await fetch("https://www.outletexpense.xyz/uploads/3-Evan-Khan/1704627341.jpg");
if (!imageResponse.ok) {
throw new Error(`Failed to fetch image: ${imageResponse.status}`);
} else {
console.log('ok');
}
} catch (error) {
console.error('Error fetching image:', error);
}
};
fetchImage();