Guest User

Untitled

a guest
Aug 1st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. try
  2. IdHTTP1:=TIdHTTP.Create(nil);
  3. try
  4. LHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  5. try
  6. // does not seem to do anything
  7. LHandler.TransparentProxy.Host:='2.2.2.2';
  8. LHandler.TransparentProxy.Port:=8084;
  9. LHandler.TransparentProxy.Enabled:=true;
  10.  
  11. // this works even when using HTTP proxy for HTTPS
  12. idHTTP1.ProxyParams.ProxyServer:='1.1.1.1';
  13. idHTTP1.ProxyParams.ProxyPort:=8080;
  14.  
  15.  
  16. IdHTTP1.IOHandler:=LHandler;
  17. Src:= IdHTTP1.Get('https://csv.business.tomtom.com/extern?account='+company+'&username='+user+'&password='+password+'&apikey='+apikey+'&lang=en&action=showObjectReportExtern');
  18. finally
  19. LHandler.Free;
  20. end;
  21. finally
  22. IdHTTP1.Free;
  23. end;
  24. except on E: Exception do
  25. // Writeln(E.ClassName, ': ', E.Message);
  26. end;
Add Comment
Please, Sign In to add comment