Skip to content

Commit

Permalink
Emit an event after we create the request object so that people can m…
Browse files Browse the repository at this point in the history
…anipulate it before nextTick().
  • Loading branch information
mikeal committed Feb 8, 2012
1 parent 00105c2 commit c08ab7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ Request.prototype.request = function () {
}
}
})



if (self.timeout && !self.timeoutTimer) {
self.timeoutTimer = setTimeout(function() {
Expand All @@ -494,6 +496,8 @@ Request.prototype.request = function () {
}

self.req.on('error', clientErrorHandler)

self.emit('request', self.req)
}

self.once('pipe', function (src) {
Expand Down

1 comment on commit c08ab7e

@mikeal
Copy link
Member Author

@mikeal mikeal commented on c08ab7e Feb 8, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did i add that extra whitespace? i shouldn't write code before having coffee.

Please sign in to comment.