Is it possible to retrieve a cookie from an HTTP response in as3 without using javascript?
My swf will potentially live on sites with embed codes that do not allow script access to the movie. I need to pull a cookie from response which is typically simple using javascript, but as the swf does not have access to script, javascript is not an option. Can I access cookies or the cookie header in the response? If that is not possible is there any access to the raw response, headers and all?
Edit / Clarification
- The request is coming from foo.com to bar.com
- Bar.com is setting a cookie on foo.com
- The request can be written in any way that allows for access to that cookie. It is currenlty using URLLoader.
- AllowScriptAccess is FALSE
Th开发者_StackOverflow中文版ank you
It is not possible to get HTTP cookies directly in AS - at least in a normal SWF. You can listen to the HTTPStatusEvent
but the requestHeaders
property of that event is only available in AIR :/ (and I'm not even sure it would include the cookie). I use JS to get the cookie(s) as needed.
精彩评论