Node.js getaddrinfo ENOTFOUND

In Node.js HTTP module’s documentation:

You can either call http.get('', callback), the URL is then parsed with url.parse(); or call http.get(options, callback), where options is

  host: '',
  port: 8080,
  path: '/wiki/EteRNA_Dictionary'


As stated in the comment by @EnchanterIO, the port field is also a separate option; and the protocol http:// shouldn’t be included in the host field. Other answers also recommends the use of https module if SSL is required.

Leave a Comment