TWinHTTP
2021-07-19 23:17
阅读:545
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;
上一篇:C#写入文本文档
评论
亲,登录后才可以留言!