我想实现一个HTTP,在需要时返回RESTful错误代码。HTTP3是否可以处理负载中包含ActionScript消息的HTTP code (404,500)响应?
有什么好的参考资料可以作为我们内部Flash前端团队的反馈吗?
发布于 2017-02-14 02:42:48
我也一直在为此而苦苦挣扎。似乎答案是“不”,AS3不能。
我断断续续地看到通过IOErrorEvent.currentTarget.data传入的数据,但我不能始终如一地重现这种情况。
发布于 2013-10-22 05:32:43
您可能可以执行URLRequest,然后处理HTTP状态
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("XMLFile.xml");
loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
private function httpStatusHandler(event:HTTPStatusEvent):void {
trace("httpStatusHandler: " + event);
}
loader.load(request);查看完整的示例:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html
您可以添加dispatcher.addEventListener(Event.COMPLETE,completeHandler);来查看返回的内容。
https://stackoverflow.com/questions/19504891
复制相似问题