访问 flash.net.URLLoader 对象的 HTTP 响应标头? [英] Access HTTP response headers in for flash.net.URLLoader object?
问题描述
在使用 Flash/Flex 的 URLLoader
时,有没有办法从 HTTP 结果访问响应标头?
Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader
?
设置 request 标头是可能的,访问 响应代码 也是可能的,但获取实际响应标头似乎明显缺乏......
Setting the request headers is possible, as is accessing the response code, but getting a hold of the actual response headers seems to be conspicuously lacking...
具体来说,我想获取 Last-Modified
响应标头.
Specifically, I would like to get a hold of the Last-Modified
response header.
推荐答案
哎呀.在这里回答我自己的问题,但 AIR 引入了 URLLoader.httpResponseStatus
事件,其中包括 responseHeaders
属性(加上用于布朗尼点的 responseURL
属性).
Oops. Answering my own question here, but AIR introduces the URLLoader.httpResponseStatus
event which includes a responseHeaders
property (plus a responseURL
property for brownie points).
谢天谢地,我的问题是针对 AIR 应用程序,这样就解决了我的问题.非 AIR flash/flex 应用程序似乎无法访问响应头,这仍然有点令人震惊.
Thankfully my question was for an AIR application, so that solves my problem. It's still a bit shocking that non-AIR flash/flex applications cannot seem to access the response headers.
这篇关于访问 flash.net.URLLoader 对象的 HTTP 响应标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!