Skip to content

ECONNREFUSED - Connection was Rejected #1145

@davinpalmtreenft

Description

@davinpalmtreenft

Thank you for building such a nice and helpful extension!

  • REST Client Version: v0.25.1
  • VSCode Version: 1.77.3
  • OS Version: Windows 11
  • Node version: 18.16.0

Steps to Reproduce:

  1. Brand new pc with latest software and fresh hard drive (was working fine on my old pc, I am not sure which node version I was running there but it was likely older and I read elsewhere here that could be the problem).
  2. Pulled my existing repo with suite of http tests utilizing rest client extension
  3. npm run dev my server and everything starts up as normal
  4. When I go to send a request from the test file I get this error:
The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:4000.

I am able to make the same requests successfully from the browser and in postman, no problem. I did some research and tried experimenting with proxy settings but to no avail. These are the current proxy settings I have:

{
  "http.proxy": "http://localhost:4000",
  "http.proxyStrictSSL": false,
  "rest-client.excludeHostsForProxy": ["localhost:4000"],
}

Any help would be much appreciated, I am battling this for a few days and I would love to have my rest client functional again :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions