delphi IDHTTP超时重定向


本文整理自网络,侵删。

 function Get(URL: string): boolean;
var
IDHTTP: TIDHttp;
ss: String;
begin
Result:= False;
IDHTTP:= TIDHTTP.Create(nil);
try
try
idhttp.HandleRedirects:= true; //必须支持重定向否则可能出错
idhttp.ReadTimeout:= 30000; //超过这个时间则不再访问
ss:= IDHTTP.Get(URL);
if IDHTTP.ResponseCode=200 then
Result :=true;
except
end;
finally
IDHTTP.Free;
end;
end;

相关阅读 >>

Delphi 在线程中运行窗体

Delphi 获取本机 hostname ip address

Delphi 使用firedac tfdibbackup和tfdibrestore备份和还原firebird

Delphi 获得指定进程的id号

Delphi xe5 for android ttabcontrol 控件

Delphi实现拖动无标题窗口的5种方法

Delphi通过ip或机器名获取局域网mac地址

Delphi unigui unicheckbox勾选

Delphi 字符串的分割

Delphi txt日志log

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



打赏

取消

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

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

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

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

评论

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