How to download a file into the memory

 
procedure TfmTestDownloader.btDownLoadClick(Sender: TObject);   
begin   
   if clDownloader1.IsBusy then Exit;   
 
   FMemory := TMemoryStream.Create();   
   clDownloader1.DataStream := FMemory;   
   clDownloader1.URL := 
        'http://www.clevercomponents.com/checknews/clnews.html';   
   clDownLoader1.Start();   
end;  
 
procedure TfmTestDownloader.clDownLoader1ProcessCompleted(
    Sender: TObject);   
begin   
   clDownloader1.DataStream := nil;   
   FMemory.SaveToFile('clnews.html');   
   FMemory.Free();   
end; 

Add Feedback