Json 使用Actionscript覆盖艺术API URL请求

Json 使用Actionscript覆盖艺术API URL请求,json,actionscript-3,api,http-status-codes,Json,Actionscript 3,Api,Http Status Codes,我正在尝试使用封面艺术档案api 但我得到的只是: 状态:[HTTPStatusEvent type=“httpStatus”气泡=false可取消=false eventPhase=2状态=0响应URL=null] io:[IOErrorEvent type=“ioError”气泡=false可取消=false eventPhase=2 text=“Error#2032:流错误。URL:] 谁能告诉我我做错了什么 Thx 编辑1:添加: request.requestHeaders=新数组(新

我正在尝试使用封面艺术档案api

但我得到的只是:

状态:[HTTPStatusEvent type=“httpStatus”气泡=false可取消=false eventPhase=2状态=0响应URL=null]

io:[IOErrorEvent type=“ioError”气泡=false可取消=false eventPhase=2 text=“Error#2032:流错误。URL:]

谁能告诉我我做错了什么

Thx

编辑1:添加: request.requestHeaders=新数组(新的URLRequestHeader(“接受”、“应用程序/json”);
还是不行…

我不认为你做错了什么。HTTP请求似乎返回了
307临时重定向
状态:

$ curl -v http://coverartarchive.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd/
* About to connect() to coverartarchive.org port 80 (#0)
*   Trying 72.29.166.157... connected
* Connected to coverartarchive.org (72.29.166.157) port 80 (#0)
> GET /release/76df3287-6cda-33eb-8e9a-044b5e15ffdd/ HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: coverartarchive.org
> Accept: */*
> 
< HTTP/1.1 307 TEMPORARY REDIRECT
< Date: Sun, 20 Jan 2013 21:09:02 GMT
< Content-Type: text/plain; charset=utf-8
< Connection: keep-alive
< Keep-Alive: timeout=20
< Content-Length: 86
< Location: http://archive.org/download/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/index.json
< Access-Control-Allow-Origin: *
< Server: CherryPy/3.1.2 WSGI Server
< 
See: http://archive.org/download/mbid-76df3287-6cda-33eb-8e9a-044b5e15ffdd/index.json
* Connection #0 to host coverartarchive.org left intact
* Closing connection #0
$curl-vhttp://coverartarchive.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd/
*即将连接()到coveragearchive.org端口80(#0)
*正在尝试72.29.166.157。。。有联系的
*已连接到covertarchive.org(72.29.166.157)端口80(#0)
>获取/发布/76df3287-6cda-33eb-8e9a-044b5e15ffdd/HTTP/1.1
>用户代理:curl/7.21.4(universal-apple-darwin11.0)libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
>主持人:coveritarchive.org
>接受:*/*
> 

抱歉,Flash
URLLoader/URLRequest
无法为您处理重定向;我看到的唯一解决方案是自己使用
Socket
类发出HTTP请求,然后自己绘制
位置的图形

除了Antoine的回答之外,AS3 url加载器还可以跟踪重定向

loader.followRedirects = true;
更多详情请参阅

loader.followRedirects = true;