Delphi 用IdHTTP控件获取网页源码报错
代码如下:
try
v_Temp:=IdHTTP1.Get('http://www.google.com');
except
Showmessage('Error');
end;
抛异常为:
Project main.exe raised exception class EIdSocketError with message 'Socket Error # 10054
Connection reset by peer.'. Process stopped. Use Step or Run to continue.
不知道是什么原因造成的,有的时候可以,有的时候不行,不知道原因,请高手给出解释,谢谢