Created
February 7, 2020 05:36
-
-
Save kuanhsuh/aeca064f417fbac265d859f186821c4c 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 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