dman
dman

Reputation: 11073

node-http-proxy proxy.on('proxyReq'...) never fires

I am using node.js proxy. It works successfully, however:

proxy.on('proxyResponse', function (proxyRes, req, res) {
    console.log("hi");

});

Never fires even though I see in the browser my api request was proxied successfully and I successfully got my json. Why isn't the proxyResponse firing?

Upvotes: 0

Views: 769

Answers (1)

cviejo
cviejo

Reputation: 4398

Try proxy.on('proxyRes', ... instead.

Upvotes: 1

Related Questions