From 5cd416765c4c256838c60bfe04203c16233edf55 Mon Sep 17 00:00:00 2001 From: Maria Cosmen Date: Mon, 28 Aug 2023 08:53:55 +0900 Subject: [PATCH] Reto #10 - Javascript --- .../javascript/mcosme000.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Retos/Reto #10 - LA API [Media]/javascript/mcosme000.js diff --git a/Retos/Reto #10 - LA API [Media]/javascript/mcosme000.js b/Retos/Reto #10 - LA API [Media]/javascript/mcosme000.js new file mode 100644 index 0000000000..7952f6866d --- /dev/null +++ b/Retos/Reto #10 - LA API [Media]/javascript/mcosme000.js @@ -0,0 +1,12 @@ +const axios = require('axios'); + +const fetchData = async (url) => { + try { + const response = await axios.get(url) + console.log(response.data); + } catch (error) { + console.log(error); + } +} + +fetchData("https://zelda.fanapis.com/api/items");