17

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.

bignose
  • 24,957
  • 12
  • 70
  • 100
aaaidan
  • 6,422
  • 8
  • 58
  • 98

1 Answers1

14

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.

aaaidan
  • 6,422
  • 8
  • 58
  • 98
  • I'm trying to get hold of response header when loading mp3 in sound object (there should come some additional headers). Any idea? – jayarjo Jul 18 '10 at 14:20
  • Hmm, can't tell you off the top of my head - I think more info would help. Be bold and ask a new question, I say. Comment the link here, and I'll try answer. – aaaidan Jul 20 '10 at 10:32
  • It looks like the Flash Player does not get the http response status event. More info here, http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/HTTPStatusEvent.html. If anything has changed still looking for a way to do this. – 1.21 gigawatts Apr 26 '17 at 04:12