Gabriel C
Gabriel C

Reputation: 263

Insomnia rest client error

When I do a POST request I am getting this error. Error: connect ECONNREFUSED 127.0.0.1:3000. On the contrary, when I use postman it works.

This is the url: http://localhost:3000/users/sign_in

And this is my configuration:

JSON tab:

{"user": {"email": "[email protected]", "password": "clave12345"}}

Headers:

Upvotes: 5

Views: 22219

Answers (2)

gschier
gschier

Reputation: 326

I'm the developer of Insomnia, and would like to let you know that this problem has been fixed in a recent release.

The app will now first attempt an IPv6 lookup (usually ::1), then fallback to an IPv4 lookup (usually 127.0.0.1) on error. This now aligns with the behavior of the curl command line tool.

You can download the latest version here for Mac, Windows, or Linux.

Upvotes: 9

More Axes
More Axes

Reputation: 369

I'm a little late here obviously, but if you've never figured it out, using http://[::1] instead of http://localhost solved this issue for me. It seems that some servers (in my case, Rust's Iron), when told to listen on localhost, interpret it as IPv6 ([::1]), hence the IPv4 address stops working.

Upvotes: 2

Related Questions