New topic: HTTPSecureSocket post with redirection on response
<http://forums.realsoftware.com/viewtopic.php?t=36843> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message KevinCully Post subject: HTTPSecureSocket post with redirection on responsePosted: Tue Dec 28, 2010 12:03 pm Joined: Tue Jan 12, 2010 10:46 am Posts: 23 The goal is to login to a website via SSL, receive the response which then passes me a cookie and the location of the new page. I then want to then GET that page and determine whether the entire process was successful. I'm having all sorts of trouble getting it to work in a non-debugging environment. My oHTTPSecureSocket is a subclass of the HTTPSecureSocket class.I've added a method called oHTTPSecureSocket.OnlineLogin which returns a boolean on whether we logged in.Inside of the oHTTPSecureSocket.OnlineLogin, I've created a dictionary of variables to POST to the site.oHTTPSecureSocket.Secure is set to True.oHTTPSecureSocket.Yield is set to False. (But I've also tried True.)I then call the oHTTPSecureSocket.Post method with the https://URLControl is immediately returned to the oHTTPSecureSocket.OnlineLogin before the oHTTPSecureSocket.PageReceived is fired. Perhaps I need a way to poll for completion at this point? I've tried waiting on TICKS and waiting on App.SleepCurrentThread but to no avail.In oHTTPSecureSocket.PageReceived I then test for their 302 redirection. If 302 then I set the cookie and do a oHTTPSecureSocket.Get on the URL they pass me. When I debug through the above process, the oHTTPSecureSocket.PageReceived completes during the time I am stepping through the polling process. However, when running without breakpoints, the polling completes (even waiting 30 seconds which is plenty of time), and THEN the oHTTPSecureSocket.PageReceived fires after the program thinks it's completed. Can someone shed some light on how to accomplish this HTTPS post and get properly? Thanks so much! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
