projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c409aab
)
Add on('error') to http request example
author
Ryan Dahl
<ry@tinyclouds.org>
Thu, 5 May 2011 22:40:45 +0000
(15:40 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Thu, 5 May 2011 22:40:55 +0000
(15:40 -0700)
for indexzero
doc/api/http.markdown
patch
|
blob
|
history
diff --git
a/doc/api/http.markdown
b/doc/api/http.markdown
index
6cecc82
..
e16d384
100644
(file)
--- a/
doc/api/http.markdown
+++ b/
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
req.write('data\n');
req.write('data\n');