“Could not get any response” response when using p

2019-01-14 01:28发布

I am using postman to test an API I have, all is good when the request does not contain sub-domain, however when I add a sub-domain to URL I am getting this response.

Could not get any response

There was an error connecting to http://subdomain.localhost:port/api/

Why this might have happened:

The server couldn't send a response:Ensure that the backend is working properly

Self-signed SSL certificates are being blocked:Fix this by turning off 'SSL certificate verification' in Settings > General

Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy

Request timeout:Change request timeout in Settings > General

If I copy the same URL from postman and paste it into the browser I get a proper response, is there some kind of configurations I should do to make postman work with sub-domains?

8条回答
贪生不怕死
2楼-- · 2019-01-14 01:35

If all above methods doesn't work check your environment variables, And make sure that the following environments are not set. If those are set and not needed by any other application remove them.

HTTP_PROXY
HTTPS_PROXY

Reference link

查看更多
我命由我不由天
3楼-- · 2019-01-14 01:37

When getting the following error, enter image description here

you need to do the following.

Step 1: In Postman, click the wrench icon, go to settings, then go to the Proxy tab.

Step 1 Wrench Icon > Settings > Proxy Tab

Step 2: Create a custom Proxy. This article explains how to create a custom proxy. After you create the custom Proxy, make sure you turn the Proxy toggle button to off. I put 61095 in for the proxy server and it worked for me.

enter image description here

Step 3 :

Success

Success

查看更多
来,给爷笑一个
4楼-- · 2019-01-14 01:38

I had the same issue. It was caused by a newline at the end of the "Authorization" header's value, which I had set manually by copy-pasting the bearer token (which accidentally contained the newline at its end)

查看更多
来,给爷笑一个
5楼-- · 2019-01-14 01:50

You mentioned you are using a CER certificate.

According to the Postman page on certificates.

Choose your client certificate file in the CRT file field. Currently, we only support the CRT format. Support for other formats (like PFX) will come soon.

The name of the extension CER, CRT doesn't make the certificate that type of certificate but, these are the excepted extensions names.

CER is an X.509 certificate in binary form, DER encoded.

CRT is a binary X.509 certificate, encapsulated in text (base-64) encoding.

You can use OpenSSL to change a CER file into a CRT file. I have not had good luck with it but it looks like this.

openssl x509 -inform PEM -in certificate.cer -out certificate.crt

or

openssl x509 -inform DER -in certificate.cer -out certificate.crt

查看更多
Fickle 薄情
6楼-- · 2019-01-14 01:56

First Go to Settings in Postman:

enter image description here

1) Off the SSL certificate verification in General Tab: enter image description here

2) Off the Global Proxy Configuration and Use System Proxy in Proxy Tab enter image description here

查看更多
叼着烟拽天下
7楼-- · 2019-01-14 01:56

For me, it was that route that I was calling in my node server wasn't returning anything. Adding

    return res.status(200).json({
        message: 'success!',
        response: 'success!'
    });//

to the route I was calling resolved the issue.

查看更多
登录 后发表回答