I ended up using BrowserComponent.executeAndReturnString and used a synchronous javascript call to make the same call that the ConnectionRequest was doing. Its a bit of a hack, requires a synchronous call and injects logic in javascript in the middle of the app but it does get the response from the end point and doesn't log out the browser component while doing it.
As a result its working which is fine for now, but I think it does highlight an issue with the way cookies are shared between BrowserComponent and ConnectionRequest, the following process appears to be problematic: 1. Log in via a BrowserComponent -> sets cookie 2. Make a ConnectionRequest to the same domain -> uses cookie fine 3. Further action on BrowserComponent -> cookie is gone By replacing step 2 with a javascript call to the same endpoint within the existing BrowserComponent it stays online. Cheers, On Tuesday, 20 June 2017 16:25:48 UTC+12, Shai Almog wrote: > > I'm guessing this is because of the native store sync overriding the > cookies but Steve knows more about this. Unfortunately he's up to his neck > in some tasks for the 3.7 release. > You get the cookies in the first request. Can't you send them back thru > the JS bridge? > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/8d3583e4-1d8b-4f28-9111-e6ddbf2dde76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
