Making a call to another server from a node server deployed on heroku gives timeout error

74 views Asked by At

I have deployed a express server on Heroku, when i try to make get call to any other server i get this error
Error: connect ETIMEDOUT 192.225.208.117:443 at Object._errnoException (util.js:992) at _exceptionWithHostPort (util.js:1014) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186)

Below is the code i am trying

app.get('/',function(req,res,next){
        axios.get("http://www.example.com")
            .then((data)=>{
                res.send(data.data)
            })
            .catch((error)=>{
                res.send(error);
            })  

});
0

There are 0 answers