ich lade mit folgendem Code eine Seite ueber HTTPS herunter und verwende dafuer Synapse und die OpenSSL Libraries Version 0.9.8d oder 1.0.2, beides auf Win32:
Code: Alles auswählen
function HttpsGetText(const URL: string; const Response: TStrings): boolean;
var
HTTPSend: THTTPSend;
begin
HTTPSend := THTTPSend.Create;
try
HTTPSend.Sock.CreateWithSSL(TSSLOpenSSL);
HTTPSend.Sock.SSLDoConnect;
Result := HTTPSend.HTTPMethod('GET', URL);
if Result then
Response.LoadFromStream(HTTPSend.Document);
finally
HTTPSend.Free;
end;
end;
procedure TForm1.TestHttpsButtonClick(...);
var
MyStrings: TStringList;
begin
try
MyStrings := TStringList.Create;
if HttpsGetText('https://www.google.com/', MyStrings) then
ShowMessage(MyStrings.CommaText);
finally
FreeAndNil(MyStrings)
end;
end;
Was mache ich hier falsch?
Danke und schoenen Abend!