async function getData() {
const data = await fetch(url)
.then((res) => {
if (res.status === 200) {
return res.json();
} else {
throw new Error("Server Error");
}
})
.then((deb) => {
console.debug(deb);
})
.catch((er) => {
console.error(er);
});
console.log(data)
}
getData();