Postman can't reach localhost

user1329339 picture user1329339 · Mar 6, 2018 · Viewed 82.9k times · Source

I am in a corporate env so I have to use a proxy to reach servers. This works well in postman and in browsers. What I can't reach is localhost in postman but I can reach localhost in the browser.

I am running Postman for Linux Version 6.0.9. I have tried reaching localhost:9082/rest/myapi.... and 127.0.0.1:9082/rest/myapi with both global proxy and system proxy turned on and with either turned on and with non turned on. In all cases I am not able to reach localhost.

What I get as an response is an error page from the proxy server! Someway the call gets out on the network instead of being kept on my machine.

The postman console:

My request headers are:

Cache-Control →no-cache
Connection →Keep-Alive
Content-Length →986
Content-Type →text/html; charset=utf-8
Pragma →no-cache
Proxy-Connection →Keep-Alive

My response headers are:

cache-control:"no-cache"
pragma:"no-cache"
content-type:"text/html; charset=utf-8"
proxy-connection:"Keep-Alive"
connection:"Keep-Alive"
content-length:"986"

My response body is an html page.

How can I make a call to localhost work with postman?

Answer

Tonmoy picture Tonmoy · Dec 30, 2018

I was having similar issue with HTTP calls to local ASP.NET Core Web API apps. Changing the proxy settings didn't fix it for me.

Finally fixed it by turning off File > Settings > General > SSL Certificate Verification

Hope that helps someone out there.