Skip to content

Instantly share code, notes, and snippets.

@fbn4sc
Last active January 25, 2018 01:31
Show Gist options
  • Save fbn4sc/fb21972495cab58db00f4205269bfb76 to your computer and use it in GitHub Desktop.
Save fbn4sc/fb21972495cab58db00f4205269bfb76 to your computer and use it in GitHub Desktop.
Fetchs data from a given url.
const http = require("http");
const url = process.argv[2];
http.get(url, response => {
response.setEncoding("utf8");
response.on("data", data => console.log(data));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment