I just began having problems with Indy. For some weird reason, even this very basic procedure doesn’t work:
procedure TForm1.Button1Click(Sender: TObject);
var ID: TIdHTTP;
ms: TMemoryStream;
begin
ID:=TIdHTTP.Create();
ms:=TMemoryStream.Create;
ID.HandleRedirects:=true;
ID.Get('http://www.google.com',ms);
Memo1.Lines.LoadFromStream(ms);
end;
Nothing gets added to the Memo1. SizeOf(ms) returns 4.
I even reinstalled Indy, still nothing. My project definitely worked before, but doesn’t download anything from any page now. I wonder, what is the problem?
try calling
before
also, the size of the stream can be found out by invoking the “Size” property like so