On a blank Delphi 11 project I dropped a button and an TIdHTTP component.
The button attempts to get a .txt file.
procedure TForm1.Button1Click(Sender: TObject);
var
Stream: TMemoryStream;
begin
Stream := TMemoryStream.Create;
try
IdHTTPGetProgramUpdateFile.Get('https://www.bookup.com/cowupdates/build129.txt',
Stream);
except
on E: Exception do
begin
MessageDlg(E.Message,
TMsgDlgType.mtInformation,
[TMsgDlgBtn.mbOK],
E.HelpContext);
end;
end;
Stream.SaveToFile('downloaded.txt');
Stream.Free;
end;
If the Windows project requests the URL with https then the error is "Could not load SSL Library."
If the project on Windows or Macintosh requests the URL with http then the error is "301 Moved Permanently". (The file is on the web site.)
If the project is run on a Macintosh with https then the PAServer reports the project "is loading libcrypto in an unsafe way."
When running for Windows, the project throws an exception in IdSSLOpenSSL.pas
with the source code comment:
an exception here probably means that you are using the wrong version of the openssl libraries. refer to comments at the top of this file.
The comments at the top of the file were not useful to me.
I'm trying to download the contents of a text file from a web site and I know very little about the internet protocols. What am I missing?