I am getting an error while calling an API locally. The same API is working fine in Postman. Please help me how to resolve this.
1 answers

The issue is in the httpHostConnection, that states that there was a time out.

As described here there are 3 options that couold cause this:

  1. The URL expects headers like User-Agent. You can set request headers needed 

  2. You are in a corporate or restricted environment and need a proxy to connect to external URLs. Your browser might already be setup to use proxy server. In this case, you will need to pass proxy credentials to http client API.

  3. All outgoing requests are blocked in your environment by firewall or something. In this case, you will need to ask your network admin to allow network connection.