delphi Tidhttp error could
procedure TfrmMain.DownloadPicture(const AURL: string);
var
MeS: TMemoryStream;
cidSSL: TIdSSLIOHandlerSocketOpenSSL;
cidHTTP: TIdHTTP;
begin
cidHTTP:= TIdHTTP.Create(nil);
cidSSL:= TIdSSLIOHandlerSocketOpenSSL.Create(nil);
Mes := TMemoryStream.Create;
try
cidHTTP.ReadTimeout := 30000;
cidHTTP.IOHandler := IdSSL;
cidSSL.SSLOptions.Method := sslvSSLv3;
cidSSL.SSLOptions.Mode := sslmUnassigned;
cidSSL.StartSSL;
cidHTTP.Get(AURL, Mes);
except
on E : Exception do
begin showmessage('Error: '+E.Message);
end;
end;
Mes.Position := 0;
frmImage.Image.Bitmap.LoadFromStream(Mes);
end;
Are there any code examples left?
New code examples in category Delphi
-
Delphi 2022-03-27 19:40:03 delphi keydown enter
-
Delphi 2022-03-20 03:25:01 get time in milliseconds delphi
-
Delphi 2022-03-16 18:50:01 delphi random letter
-
Delphi 2022-02-14 03:45:08 remove unnecessary packages raspi pixel
-
Delphi 2022-02-02 21:15:46 delete in delphi
-
Delphi 2022-02-02 17:26:35 INSERT into syntax error in delphi
-
Delphi 2022-01-23 12:15:39 pyhton instagram bot
-
Delphi 2022-01-23 09:05:59 delphi calculator
-
Delphi 2021-11-21 18:31:10 download jupyter for linux
-
Delphi 2021-11-20 04:57:08 copy delphi