Error: getaddrinfo ENOTFOUND in nodejs for get call

getaddrinfo ENOTFOUND means client was not able to connect to given address. Please try specifying host without http:

var optionsget = {
    host : 'localhost',
    port : 3010,
    path : '/quote/random', // the rest of the url with parameters if needed
    method : 'GET' // do GET

Regarding learning resources, you won’t go wrong if you start with and then go through some good book to get more in-depth knowledge – I recommend Professional Node.js , but there’s many out there.

Leave a Comment