02-28-2022, 03:47 PM
[/url]
I use Indy 10.6.2 with Delphi 7.
I must connect to a https server. I use this code :
we have a proxy on lan : [url=http://proxy-client.xxxxx.fr]http://proxy-client.xxxxx.fr (Port : 8080)
I use proxyparams :
Then I have error 10001 (host not found) but when I dont't use proxyparams,, I have 10060.
Do you have any idea please ?
Thank you in advance.
Laurent.
I use Indy 10.6.2 with Delphi 7.
I must connect to a https server. I use this code :
Code:
FIdHTTP := TIdHTTP.Create(nil);
FIdHTTP.HandleRedirects := True;
FIdSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
FIdSSL.SSLOptions.Mode := sslmClient;
FIdSSL.SSLOptions.SSLVersions := [sslvTLSv1_1,sslvTLSv1_2];
FIdHTTP.IOHandler := FIdSSL;
FIdHTTP.Request.Clear;
FIdHTTP.Request.ContentType := 'application/json';
FIdHTTP.Response.ContentType := 'application/json';
FIdHTTP.Request.CustomHeaders.Values['Authorization'] := 'Basic xxxxxxx==';
FIdHTTP.Post(zURL, zJsonStreamIn, zJsonStreamOut);
finally
zJSon := zJsonStreamOut.DataString;
end;
I use proxyparams :
Code:
FIdHTTP.ProxyParams.ProxyServer := 'http://proxy-client.in.ac-grenoble.fr';
FIdHTTP.ProxyParams.ProxyPort := 8080;
FIdHTTP.ProxyParams.BasicAuthentication := False;
Do you have any idea please ?
Thank you in advance.
Laurent.