Update README

This commit is contained in:
Miao Jiang 2013-02-20 03:30:36 +08:00
parent 91f39f4652
commit 648e170fa8
2 changed files with 5 additions and 2 deletions

View file

@ -10,6 +10,7 @@ if (!url)
curl.setopt('URL', url);
curl.setopt('CONNECTTIMEOUT', 2);
curl.setopt('VERBOSE', 1);
// on 'data' must be returns chunk.length, or means interrupt the transfer
curl.on('data', function(chunk) {
@ -25,7 +26,7 @@ curl.on('error', function(e) {
curl.on('end', function() {
curl.getinfo('RESPONSE_CODE');
p("code: " + curl.getinfo('RESPONSE_CODE'));
curl.close();
p('done.');
});