是的,详细的:
procedure DownFile(sName, DName: string);
var
Response: TFileStream;
HttpDown: TIdHTTP;
begin
HttpDown := TIDHttp.Create(nil);
try
HttpDown.Request.ProxyPort := 80;
HttpDown.Request.ContentType := 'application/x-www-form-urlencoded';
Response := TFileStream.Create(DName, fmCreate);
try
HttpDown.Get(sName, response);
finally
Response.Free;
end;
finally
HttpDown.free;
end;
end;