本文整理自网络,侵删。
var
FHTTPClient:TIdHTTP;
begin
FHTTPClient := TIdHTTP.Create( Self );
with FHTTPClient do
begin
Disconnect;
Request.Pragma := 'no-cache';
Request.CacheControl := 'no-cache';
Request.Connection := 'close';
ReadTimeout := 1000 * 60 * 1;//1分钟超时
memo1.Text :=Get( 'http://hk.news.yahoo.com/busi/general/prnewswire/' );
end;
freeandnil(FHTTPClient);
相关阅读 >>
Delphi开发firemonkey应用程序时无法打开窗体的解决
Delphi windows 编程[19] - 改变菜单项的状态: getmenustate、enablemenuitem
Delphi关于dbgrid和webbrowser的焦点问题
更多相关阅读请进入《Delphi》频道 >>