delphi IdHttp 获取链接连通状态


本文整理自网络,侵删。

 
var
  http : TIdHttp;
  url : string;
  code : integer;
begin
  url := 'http://www.delphitop.com/';
  http := TIdHTTP.Create(nil);
  try
    try
      http.Get(url, nil);
      code := http.ResponseCode;
    except
      on E: EIdHTTPProtocolException do
        code := http.ResponseCode; // or: code := E.ErrorCode;
    end;
    ShowMessage(IntToStr(code));
  finally
    http.Free();
  end;

相关阅读 >>

Delphi在memorystream查找字符串

Delphi里动态创建access的交叉表视图

Delphi xe6 读取android设备联系人

Delphi 杀进程(包括系统进程)

Delphi中webbrowser(或者embeddedwebbrowser)控件打开部分网站报“invalid floating point operation”异常的解决方法

Delphi xe5实现通过tmemorystream将一个unicodestring写入到一个unicode文本文件

Delphi串口api函数

Delphi删除整个目录及目录下的文件

Delphi 生成guid算法的单元

Delphi dbnavigator1 删除时弹出确认对话框

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



打赏

取消

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

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

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

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

评论

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