This content has been marked as final. Show 4 replies
Our system is creating a cookie which stores the session details so when the next CFHTTP command is performed it isn't viewed as "logged in". How can I get the CFHTTP to store the session?
I'm not sure you can. Because the CFHTTP user agent doesn't store cookies, there is no way to maintain session state. At least as of MX 6.1. You may want to consider placing your clean up script outside of your login, or at least change it so that the login validation and clean up occur on the same page for this particular process.
You have to parse and store Set-Cookie header on the first response (and, perhaps, on subsequent responses, dependently on your session implementation). After that you should provide Cookie header within your chain of requests.
Alternatively, you can use CFX_HTTP5, which handles sessions for you.
Good call on the headers. I completely forgot about that!