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 生成并替换txt里的内容

Delphi 数据模块池

Delphi directx简单应用

Delphi 得到 winrar 处理解压缩文件的返回值 ?

Delphi wmi 取显卡gpu信息

Delphi 上传文件到七牛,纯原生

Delphi winapi: loadstring - 从资源中载入字符串

Delphi idhttp友好错误信息的捕获

Delphi 游戏测试call

Delphi [android]获取屏幕的物理分辨率

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



打赏

取消

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

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

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

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

评论

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