(With reference to this answer🙂
When I POST with a URLRequest, does it automatically include cookies from the browser session in which Flash is hosted? If not, how can I make it include them, or if necessary retrieve them and include them myself?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Provided the cookie domains (of the page hosting the Flash control and the URL to which you’re posting) match, then yes, the browser cookies get sent with the request by default. As a quick example (working version here), I’ve thrown together a simple ColdFusion page hosting a SWF containing the following code:
… and in that page, I set a cookie, called ‘USERID’, with a value of ‘12345’. After clicking Submit, and navigating to another CFM, my server logs reveal the cookie passed through in the request:
If you test it out yourself, you’ll see the postData in there as well.
Make sense?