delphi IDHTTP 断开连接/超时读取


本文整理自网络,侵删。

 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 idhttp控件:get/post 请求

Delphi程序升级到64位

Delphi 删除文件的函数

Delphi 动画窗体

Delphi xe更改ttrayicon系统任务栏图标(无模糊)

Delphi 读取dll所有输出函数名

Delphi连接mysql出现乱码

Delphi idftp

Delphi 7中ado控件打开access数据库文件

Delphi waitforsingleobject 响应窗体

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...