用Tidhttp下载文件

procedure TForm1.btn1Click(Sender: TObject);
var
stm:TFileStream;
begin
stm:
=TFileStream.Create('c:\test.exe',fmCreate);
http.Get(
'http://www.domain.com/test.exe',stm);
stm.Free;
end;

原文地址:https://www.cnblogs.com/Aricc/p/1341378.html