TWinHTTP
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;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/8047600.html