1 | // pipe to file
|
2 |
|
3 | var FetchStream = require("../lib/fetch").FetchStream,
|
4 | fs = require("fs"),
|
5 | inp, out;
|
6 |
|
7 | inp = new FetchStream("http://google.com");
|
8 | out = fs.createWriteStream('google.html');
|
9 |
|
10 | inp.on("end", function(){
|
11 | console.log("downloaded!");
|
12 | });
|
13 |
|
14 | inp.pipe(out); |
\ | No newline at end of file |