Skip to content

Make http.request work offline #17641

Closed
Closed
@zvxayr

Description

@zvxayr

Node Version: v8.9.3
Platform: Windows 8 64-bit

I am trying to make a client communicate to a server on the same device offline through http but only get this error instead:

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOENT localhost:8000
    at Object._errnoException (util.js:1024:11)
    at errnoException (dns.js:55:15)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)

I ran the client code online and it works so I suspect that http.request does not work without internet connectivity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions