Created
July 7, 2021 22:49
-
-
Save rogerwelin/31b1c05bf6e595154caee47e60c74236 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const getapa = async () => { | |
try { | |
let response = await axios.get('https://jsonplaceholder.typicode.com/users'); | |
return response | |
} catch (error) { | |
throw new Error(error) | |
} | |
} | |
getapa().then((val) => { | |
console.log(val) | |
}).catch(e => console.log(e)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment