Skip to content

Instantly share code, notes, and snippets.

@dineshnagarit
Created May 17, 2019 04:09
Show Gist options
  • Save dineshnagarit/2888c7db81b44daeb63985970e4764ab to your computer and use it in GitHub Desktop.
Save dineshnagarit/2888c7db81b44daeb63985970e4764ab to your computer and use it in GitHub Desktop.
const request = require("request-promise-native");
async function processData() {
try {
let response = await request("https://www.andreasjakl.com/");
if (response.length > 100) {
let response2 = await request("https://www.andreasjakl.com/wp-content/uploads/2018/08/arcore-anchors.gif");
console.log("Data: ", response2.substring(0,10));
}
} catch (error) {
console.log("Error: ", error);
}
}
processData();
console.log("Starting...");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment