Created
May 1, 2017 17:25
-
-
Save pllearns/b2b2c1882c1aae47fa8acfd228b37445 to your computer and use it in GitHub Desktop.
Solution to http.client in learnyounode --> http.client
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
'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