码迷,mamicode.com
首页 > Windows程序 > 详细

TWinHTTP

时间:2017-12-16 21:12:51      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:use   proc   seh   str   nal   head   serve   crt   const   

TWinHTTP

USES SynCrtSock

procedure hget(const url: string; var ResponseCode: Integer; var ResponseHeader, ResponseData: SockString);
var
aURI: TURI;
http: TWinHTTP;
begin
http := nil;
try
aURI.From(url);
http := TWinHTTP.Create(aURI.Server, aURI.Port, aURI.Https);
http.IgnoreSSLCertificateErrors := true;
ResponseCode := http.Request(aURI.Address, ‘GET‘, 0, ‘‘, ‘‘, ‘‘, ResponseHeader, ResponseData);
finally
aURI.Clear;
http.Free;
end;
end;

TWinHTTP

标签:use   proc   seh   str   nal   head   serve   crt   const   

原文地址:http://www.cnblogs.com/hnxxcxg/p/8047600.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!