Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created April 12, 2014 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfromaniello/10557273 to your computer and use it in GitHub Desktop.
Save jfromaniello/10557273 to your computer and use it in GitHub Desktop.
app.get('/foo', function (req, res) {
var proxy = request.get('https://foo.bar/blah');
//intercept the response:
proxy.pipefilter = function (response, dest) {
console.log('The statusCode was: ', response.statusCode);
};
proxy.pipe(res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment