我试图获取网址的网页来源,例如https://plus.google.com/+odesk
我收到了以下错误:
错误#2032:流错误。网址:https://plus.google.com/+odesk
以下是我使用的代码:
private var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(Url);
//*** 60 second's timeout **
request.idleTimeout = 120 * 1000;
try {
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(request);
}catch (error:Error)
{
trace(error.message);
}
public function completeHandler(event:Event):void
{
loader = URLLoader(event.target);
trace(loader.data);
}
public function ioErrorHandler(event:IOErrorEvent):void
{
}
请帮帮我。