NodeJS 0.4.2 http.request : can the error event be fired after the response callback has been called?
In Node 0.4.2, is it possible for http.request()
to return both through the callback and the error event? If, for exampl开发者_如何学Ce, a socket error occurs after the response body has been read?
It is possible for http.request() to fire the error event after the response event has been fired, eg in the case that the server you are calling goes down while responding to your request.
Could you clarify your question?
There does exist a generic catch-all error catcher:
http://nodejs.org/docs/v0.4.4/api/all.html#event_uncaughtException_
Remember to stop into #node.js and ask questions!
精彩评论