I have a flex app that uses AMF to talk to a Spring Java backend. How do I get the values of cookies that have been set by the server and are being sent back by AMF?
Share
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.
As far as I know there’s no difference between cookies that are set during AMF request and normal web requests from the browser. So you can access those cookies with a little bit of JavaScript and ExternalInterface.
You can find code on how to do that right here on stackoverflow:
EDIT: To answer your second question… AMF is not a transport protocol. It’s just a binary protocol to transfer data on top of tranport protocols like HTTP or HTTPS. If you take a look at the specifications of AMF0 and AMF3 you won’t find any mention of cookies.
So, no AMF doesn’t use cookies (it doesn’t even know about cookies), but the underlying protocols (HTTP, HTTPS) can use them (for example to exchange session IDs). You can take a look at Wikipedia if you want to know more about HTTP Cookies.