Skip to content

Instantly share code, notes, and snippets.

@agneym
Created January 31, 2019 13:32
Show Gist options
  • Save agneym/a6917e38336cc5f1ece15450c2c9e8b8 to your computer and use it in GitHub Desktop.
Save agneym/a6917e38336cc5f1ece15450c2c9e8b8 to your computer and use it in GitHub Desktop.
API Call from Node from Axios
const axios = require("axios");
async function getData() {
const response = await axios.get("https://cat-fact.herokuapp.com/facts");
console.log(response.data);
}
getData();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment