@Schnedi3
Posted
I see you are fetching "http://api.countrylayer.com/v2/all?access_key=${process.env.REACT_APP_ACCESS_KEY"
any reason?
Because the challenge says to fetch from: https://restcountries.com/v3.1/all
@sksksk2024
Posted
Doesnt work, @Schnedi3!! :/
@Schnedi3
Posted
@sksksk2024 I meant you are using this line (this api requires an acces key) :
const res = await fetch(http://api.countrylayer.com/v2/all?access_key=${process.env.REACT_APP_ACCESS_KEY}
);
and you should be usign this (this one is a public api):
const res = await fetch("https://restcountries.com/v3.1/all");
Marked as helpful