Skip to content

Instantly share code, notes, and snippets.

@rodmcnew
Created October 29, 2021 23:17
Show Gist options
  • Save rodmcnew/c851243262151ed51b137574f20d30cd to your computer and use it in GitHub Desktop.
Save rodmcnew/c851243262151ed51b137574f20d30cd to your computer and use it in GitHub Desktop.
express js dump response body.js
app.use('/oidc',function (req, res, next) {
const oSend = res.end;res.end = (a,b,c) => {console.log('rod send', a,b,c);res.send=oSend;res.send(a,b,c)};
const oAppend = res.end;res.end = (a,b,c) => {console.log('rod append', a,b,c);res.append=oAppend;res.append(a,b,c)};
const oEnd = res.end;res.end = (a,b,c) => {console.log('rod end', a,b,c);res.end=oEnd;res.end(a,b,c)};
oidc.callback()(req,res,next);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment