Add curl.js example.

This commit is contained in:
Miao Jiang 2013-02-19 21:12:21 +08:00
parent 7c776b81a5
commit 2884985e9a
2 changed files with 32 additions and 0 deletions

24
examples/curl.js Normal file
View file

@ -0,0 +1,24 @@
// Generated by ToffeeScript 1.4.0
(function() {
var curl, p,
_this = this;
curl = require('../index');
p = console.info;
curl(process.argv[2], {
VERBOSE: 1,
DEBUG: 1
}, function(_$$_err, _$$_res) {
var err, res;
err = _$$_err;
res = _$$_res;
if (err) {
return p(err);
} else {
return p(res);
}
});
}).call(this);