Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created August 6, 2012 16:15
Show Gist options
  • Save heapwolf/3276024 to your computer and use it in GitHub Desktop.
Save heapwolf/3276024 to your computer and use it in GitHub Desktop.
emitters/remove
var req = http.request(options);
var responseListener = function(response) {
response.on("data", function(data) {
console.log("some data from the response", data);
});
}
req.on('response', responseListener);
setTimeout(function() {
req.removeListener('response', responseListener);
}, 1000);
req.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment