Bug 576479 - [Browser] requesting new API like getAllCookies(url)
Summary: [Browser] requesting new API like getAllCookies(url)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.21   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-06 12:26 EDT by u74a8 zhou CLA
Modified: 2021-10-06 12:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description u74a8 zhou CLA 2021-10-06 12:26:03 EDT
We already have getCookie(name, url), but sometimes it might be convenient to get all cookies associated with an URL, maybe as a Map<String,String>.

For example, when using Jsoup we might simply do this:

Jsoup.connect(url).cookies(Browser.getAllCookies(url)).get();

I notice that in some backends the NativeGetCookie at some point already gets things like allCookies or cookiesList, so I consider this work won't be too difficult?

Refs:
https://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/cocoa/org/eclipse/swt/browser/WebKit.java?id=85ed0e18e536dc3a79d1dabe1ef4e0fdb5581dd4#n89
https://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT%20Browser/win32/org/eclipse/swt/browser/IE.java?id=85ed0e18e536dc3a79d1dabe1ef4e0fdb5581dd4#n166
https://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT%20Browser/win32/org/eclipse/swt/browser/Edge.java?id=85ed0e18e536dc3a79d1dabe1ef4e0fdb5581dd4#n102