[TIMOB-28347] android: implement cookie in webview to have parity
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | cookie, parity, webView |
Reporter | Vijay Singh |
Assignee | Joshua Quick |
Created | 2021-02-10T20:39:52.000+0000 |
Updated | 2021-02-12T01:27:47.000+0000 |
Description
After implementing TIMOB-26915, in iOS, every WebView will have it's own cookie management. It will not be in sync with Ti.Network.HTTPClient cookies.
In android, it looks [System Cookie](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network-method-addSystemCookie) are used for WebView only. I think it can be moved inside WebView to have parity.
New WebView cookie APIs -
Method -
a) webview.addCookie(Titanium.Network.Cookie);
b) webview.removeCookie('domain', 'path', 'name');
c) webview.removeAllCookies();
d) webview. removeCookiesForDomain('domain') -> Array(Titanium.Network.Cookie)
e) webview.getCookies(''domain', 'path', 'name') -> Array(Titanium.Network.Cookie)
f) webview.cookiesForDomain('domain') -> Array(Titanium.Network.Cookie)
Property (read-only) -
e) webview.allCookies -> Array(Titanium.Network.Cookie)
No comments