Browse Source

Add on('error') to http request example

for indexzero
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
ad487d3226
  1. 4
      doc/api/http.markdown

4
doc/api/http.markdown

@ -396,6 +396,10 @@ Example:
}); });
}); });
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
// write data to request body // write data to request body
req.write('data\n'); req.write('data\n');
req.write('data\n'); req.write('data\n');

Loading…
Cancel
Save