<reponame>SigmaCorp/SDK-Sigma-Intelligence<filename>sdk_node/node_modules/fetch/example/pipe.js<gh_stars>0'use strict';

// pipe to file

var FetchStream = require('../lib/fetch').FetchStream,
    fs = require('fs'),
    inp, out;

inp = new FetchStream('http://google.com');
out = fs.createWriteStream('google.html');

inp.on('end', function(){
    console.log('downloaded!');
});

inp.pipe(out);
