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 txt编码互转 ansi utf-8

Delphi richedit根据鼠标位置定位光标的方法

Delphi 实现文件防删除非亢占(非hook)

Delphi 杀系统进程代码

Delphi hex --> string

Delphi firemonkey的屏幕分辨率hdpi、mdpi、ldpi的差别

Delphi运行时的问题,cannot focus a disabled or invisible window!

Delphi paramstr 获取外部参数

Delphi将xm音乐文件嵌入自己的程序

Delphi实现类似android锁屏的密码锁控件

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



打赏

取消

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

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

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

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

评论

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