Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const http = require('http');
- http.get('http://www.brainstation.io', function(response){
- let body = '';
- response.on('data', function(chunk){
- console.log('Body: ' + chunk)
- // re-assemble the chunk
- body += chunk;
- });
- response.on('end',function(){
- console.log('Final Body: ' + body);
- });
- });
Add Comment
Please, Sign In to add comment