下面是出错处的代码:
var
iRetris:Byte;
sEncode:string;
begin
FHTTP.Host:=HandleHost(FSiteAddr);
FHttp.HandleRedirects:=True;
FHttp.Request.AcceptCharSet:='UTF-8';
FHttp.Request.AcceptLanguage:='ch';
if FIsEncode then
sEncode:=TIdURI.ParamsEncode(UTF8Encode(FWord))
else
sEncode:=FWord;
for iRetris:=0 to 2 do //重试3次
try
Result:=FHttp.Get(FSiteAddr+sEncode); <-------------这里报错
Exit;
except
Continue;
end;
Result:='';