Sometimes production webserver servers are not allowed to access outside internet web to prevent any vulnerable attack within the server.
Sometime there may be requirement to call web api which is hosted in cloud and your private intranet web server requires to call those api which is hosted externally in such case we may use internal proxy within the network to make a call across firewall.
To enable the proxy setting I have added following piece of code in config file
Even after allowing access through proxy the server certificates are not configured properly which may results in further execution. Ensure certificates are installed in browser to make handshake to the api.
Check certificates in server