first commit
This commit is contained in:
commit
eb2f504652
32490 changed files with 5731109 additions and 0 deletions
18
node_modules/memorystream/test/example.js
generated
vendored
Normal file
18
node_modules/memorystream/test/example.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue