+ 1

How do I solve a 'name not resolved' error in async await api call?

I made this code to fetch data from an api async function coinDetails(){ try { const result= await fetch (`https://crossorigin.me/https://coinmarketcap.com/api/`); const allData= result.json(); console.log(allData);}catch(error){console.log(error)};} coinDetails(); But I got an error saying 'name not resolved' on my console. Any hint on how to fix this?

13th May 2020, 2:39 PM
Agbo Joel
Agbo Joel - avatar
2 odpowiedzi
13th May 2020, 4:21 PM
ODLNT
ODLNT - avatar
0
That solved it, thanks!
7th Jun 2020, 8:14 AM
Agbo Joel
Agbo Joel - avatar
OSZAR »