From a Dataminer installed on an internal network at a customer we need to do an API call to a cloud application. There is no direct access from this server, so a proxy server has been set up in the middle to make the communication possible. This has been setup as a default proxy on the windows machine. When testing this API access via the browser or via postman from this machine, the API call works (by passing via the configured proxy), no need to configure anything on browser level or in Postman. However when doing the call from automation using HttpClient the proxy is not used. The only way to make it work it seems is to hardcoded the proxy in the automation script as follows:
Is there another way to make sure the httpClient use the system configured proxy without hardcoding this using a proxy in the script ?
Hello David,
I think to build an interactive automation script could be usefull in this case. You could ask for the proxy address the very first time the automation is executed, save that value and then include a flag or something to the automation knows that the proxy parameter is already set and it just has to stablish the connection.
If you want to go deeper into this, you can check the Help in your DataMiner Cube App and then go to Advanced DataMiner Modules > DMS Automation > Using CSharp code in Automation scripts > Building interactive Automation scripts with CSharp.
I really have not had the oportunity to implement one of these interactive automations but I hope this could be usefull helping you to solve you problem.