Skip to main content

Set proxy

Sets the proxy settings for the connection

Function SetProxy(Val Settings) Export

ParameterCLI optionTypeRequiredDescription
Settings-InternetProxyProxy settings

Returns: DataProcessorObject.OPI_HTTPClient - This processor object


caution

NOCLI: this method is not available in CLI version


1C:Enterprise/OneScript code example
    URL = "https://httpbin.org";
URL = URL + "/get";

ProxySettings = New InternetProxy;
ProxySettings.Set("https", "proxy.com", 443, "user", "password", False);

Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.SetURL(URL)
.SetProxy(ProxySettings) // <---
.ProcessRequest("GET", False)
.ReturnConnection();