[AC-1936] Ti.Network.addHTTPCookie doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-01-31T04:40:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Studio |
Labels | n/a |
Reporter | Timothy Liu |
Assignee | Ritu Agrawal |
Created | 2014-01-23T23:15:39.000+0000 |
Updated | 2016-03-08T07:40:51.000+0000 |
Description
We're using api key authentication for our app, but the new cookie management in 3.2.0 for Android is obfuscated and does not work as expected.
I need to grab cookies from the webview and then load the cookies into our HttpClient requests. iOS uses the same cookie store, but Android needs to use the new cookie system introduced in 3.2.0.
I'm able to retrieve the cookies using:
); I feel like that's not the correct way to do it.
Thanks!
Ti.Network.getSystemCookies()
from the WebView.
However, when I run:
Ti.Network.addHTTPCookie(cookie);
It fails.
What has worked is manually generating the cookie string and setting it as a header with setRequestHeader('Cookie:',
Android and iOS platforms use different cookie management scheme so Titanium SDK 3.2.0 tries to bring parity between these two platforms. You may want to try the sample attached with TIMOB-15244 ticket and see if it resolves your issue.
Resolving this ticket as the reporter did not follow up on the suggestion and did not provide a runnable test case to reproduce this problem.