Skip to content

Instantly share code, notes, and snippets.

@pllearns
Created May 1, 2017 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pllearns/b2b2c1882c1aae47fa8acfd228b37445 to your computer and use it in GitHub Desktop.
Save pllearns/b2b2c1882c1aae47fa8acfd228b37445 to your computer and use it in GitHub Desktop.
Solution to http.client in learnyounode --> http.client
'use strict'
var http = require('http')
http.get(process.argv[2], function(response) {
response.setEncoding('utf-8')
response.on('data', console.log)
response.on('error', console.log)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment