Dear Developers,
I am trying to use network request to login to a web site. I am loading the login page first, saving the cookie received in responseHeaders and setting headers[“Cookie”] for the next request to login. Lets call this CookieVal1.
Once the Login action is called, the website does a “302 Moved Temporarily” and tries to load the logged in member page. However, it changes the cookie value to CookieVal2 as part of ResponseHeaders of the login page operation (which gave the 302 Moved, which I can see in Firebug). And the final member page expects this new cookie value (CookieVal2) and not CookieVal1 to be sent as part of the request.
However, since we do not get the control back to the code for a 302 Moved response, Corona seems to be sending CookieVal1 for the member page request as well - and this gets denied by the web application as an invalid cookie (for the web application CookieVal1 does not exist anymore, its all about CookieVal2)
Any pointers will be much appreciated.
Setup: Corona simulator on Windows 7
Cheers,
Anshuman