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