You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
364 B
18 lines
364 B
var http = require('http'), |
|
MemoryStream = require('../index'), |
|
util = require('util'); |
|
|
|
var options = { |
|
host: 'google.com' |
|
}; |
|
var memStream = new MemoryStream(null,{ |
|
readable : false |
|
}); |
|
|
|
var req = http.request(options, function(res) { |
|
util.pump(res, memStream); |
|
res.on('end',function(){ |
|
console.log(memStream.toString()); |
|
}); |
|
}); |
|
req.end();
|
|
|