I'm connecting to a DataSnap server using a generated DS client proxy class, via TDSRESTConnection. The connection works fine and I can call the server methods. I now want to connect through a proxy server, so I am setting the properties on the TDSRESTConnection object, but I can see that nothing is being sent via the proxy server, as if the properties are being ignored. My code is as follows :
var
myDS: TServerMethodsClient;
begin
DSRESTConnectionCfg.ProxyHost := 'localhost';
DSRESTConnectionCfg.ProxyPort := 8888;
myDS := TServerMethodsClient.Create(DSRESTConnectionCfg, False);
myDS.ServerMethodOne();
myDS.Free;
end;
I have also tried setting :
DSRESTConnectionCfg.HTTP.ProxyParams.ProxyServer := 'localhost';
DSRESTConnectionCfg.HTTP.ProxyParams.ProxyPort := 8888;
Both have no effect. However I know this code is working in the previous version of Delphi I was using which is XE6. Problem seems to be in the move to XE10.
Can anybody shed any light on this?