|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Cocoa Networking||MBS MacControls Plugin||11.1||Yes||No||No||Yes, macOS only||No|
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// we collect values
dim list(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
List.Append cookie.name+": "+cookie.value
// and display them
MsgBox join(list, EndOfLine)
These cookies are shared among all applications and are kept in sync cross-process.
Note: Changes made to the cookie accept policy affect all currently running applications using the cookie storage.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 2 properties
- 8 methods
- method Constructor
- method cookies as NSHTTPCookieMBS()
- method cookiesForURL(URL as string) as NSHTTPCookieMBS()
- method cookiesToArray(cookies() as NSHTTPCookieMBS) as Integer
- method deleteCookie(cookie as NSHTTPCookieMBS)
- method removeCookiesSinceDate(d as date)
- method setCookie(cookie as NSHTTPCookieMBS)
- method setCookies(cookies() as NSHTTPCookieMBS, URL as string, mainDocumentURL as string)
- 3 shared methods
- shared method NSHTTPCookieManagerAcceptPolicyChangedNotification as string
- shared method NSHTTPCookieManagerCookiesChangedNotification as string
- shared method sharedHTTPCookieStorage as NSHTTPCookieStorageMBS
- 3 constants
One of the cookie accept policy constants.
Accept all cookies. This is the default cookie accept policy.
Reject all cookies.
Accept cookies only from the main document domain.
This class has no sub classes.
Some examples which use this class:
The items on this page are in the following plugins: MBS MacControls Plugin.
MBS Xojo blog