访问 flash.net.URLLoader 对象中的 HTTP 响应标头? [英] Access HTTP response headers in for flash.net.URLLoader object?
问题描述
在使用 Flash/Flex 的 URLLoader
时,有没有办法从 HTTP 结果访问响应标头?
设置请求标头是可能的,就像访问响应代码一样,但获取实际响应标头似乎明显缺乏......>
具体来说,我想获取 Last-Modified
响应标头.
糟糕.在这里回答我自己的问题,但 AIR 引入了 URLLoader.httpResponseStatus
事件,其中包含一个 responseHeaders
属性(加上一个用于巧克力蛋糕点的 responseURL
属性).
幸运的是,我的问题是针对 AIR 应用程序的,因此解决了我的问题.非 AIR flash/flex 应用程序似乎无法访问响应标头,这仍然有点令人震惊.
Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader
?
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...
Specifically, I would like to get a hold of the Last-Modified
response header.
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).
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屋!