Skip to content

Instantly share code, notes, and snippets.

@kuanhsuh
Created February 7, 2020 05:36
Show Gist options
  • Save kuanhsuh/aeca064f417fbac265d859f186821c4c to your computer and use it in GitHub Desktop.
Save kuanhsuh/aeca064f417fbac265d859f186821c4c to your computer and use it in GitHub Desktop.
const fetch = require("node-fetch");
retrieveStatus = async url => {
try {
const res = await fetch(url);
const { status } = res;
console.log(url, status);
} catch (err) {
// handle error for example
console.error(err);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment