Postman can't reach localhost

后端 未结 19 1934
Happy的楠姐
Happy的楠姐 2020-12-23 16:34

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 lo

相关标签:
19条回答
  • 2020-12-23 16:57

    My problem was that i was setting an invalid Header token and it gave me the error

    Error: Header name must be a valid HTTP token ["Accept "] Warning: This request did not get sent completely and might not have all the required system headers

    Just check your Headers.

    0 讨论(0)
  • 2020-12-23 16:58

    @Menuka Ishan Answer is correct. But in mac only if we change the turn off proxy won't work. You need to turn off the SSL Certificate verification also you need to disable.

    0 讨论(0)
  • 2020-12-23 16:59

    Menuka Ishan's solution above saved my hours of pain! I left the Global Proxy Configuration switched ON and changed the Proxy Server to 127.0.0.1. Switched OFF the Use System Proxy. I already had the entry 127.0.0.1 localhost in my hosts file under the path C:\Windows\System32\drivers\etc.

    0 讨论(0)
  • 2020-12-23 17:01

    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.

    0 讨论(0)
  • 2020-12-23 17:03

    I found a temporary solution:

    In terminal, go to the directory where postman is installed and add:

    machine@dev:~/Documents/Postman$ export NO_PROXY=localhost,127.0.0.1
    machine@dev:~/Documents/Postman$ ./Postman 
    

    This will make calls to localhost work.

    I found a similar problem on Windows machines here

    0 讨论(0)
  • 2020-12-23 17:03

    The problem mentioned as an issue here. You should just write a simple batch file like this:

    set HTTP_PROXY=
    set http_proxy=
    set HTTPS_PROXY=
    set https_proxy=
    START %LOCALAPPDATA%\Postman\Update.exe --processStart "Postman.exe"
    

    open a simple text file, save this as a ".bat" file, and just run it!

    0 讨论(0)
提交回复
热议问题