Delphi HTTPClient Async异步获取网页代码


本文整理自网络,侵删。

 
procedure TForm1.Button10Click(Sender: TObject);
var
  Http: THTTPClient;
  Response: IHTTPResponse;
begin
  Http := THTTPClient.Create;
  try
    Response := Http.Get(Edit8.Text);
    Memo6.Text := Response.ContentAsString;
  finally
    Http.Free;
  end;
end;

procedure TForm1.Button11Click(Sender: TObject);
begin
  NetHTTPClientAsync.Get(Edit8.Text);
end;

相关阅读 >>

Delphi 用tidsmip和tidmessage发送邮件

Delphi extctrls.frame3d

Delphi 读取正在被占用的txt文件

Delphi 内存管理[4]

Delphi 磁盘类型 getdrivetype

Delphi 查找字符串并删除该字符串

Delphi 注释方法

Delphi中嵌入汇编检测是否在虚拟机里运行

Delphi中使用内联变量(inline variables) 的5个理由

Delphi 取得任意程序的命令行

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



打赏

取消

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

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

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

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

评论

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