I'm trying to use hubot msg object to send http request, but finally get this error: Error: connect EINVAL 0.0.xx.xx:80 - Local (0.0.0.0:0)
A similar question is saying this is caused by hosts file, but no detail.
I've been seeing this problem multiple times during the last two years. In all cases it was what @Shiva said: either the protocol or the port was missing.
Here is the most recent occurrence of this problem a co-worker had with the axios module in a Node.js application:
axios({ method: "get", url: "hostname:8080/liveness" })
After prepending http
it worked:
axios({ method: "get", url: "http://hostname:8080/liveness" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With