Platforms to show: All Mac Windows Linux Cross-Platform

NSHTTPCookieStorageMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Networking MBS MacControls Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
NSHTTPCookieStorage implements a singleton object (shared instance) that manages the shared cookie storage.
Example
// 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
next

// 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.

One of the cookie accept policy constants.

Constant Value Description
NSHTTPCookieAcceptPolicyAlways 0 Accept all cookies. This is the default cookie accept policy.
NSHTTPCookieAcceptPolicyNever 1 Reject all cookies.
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain 2 Accept cookies only from the main document domain.

This class has no sub classes.

Some properties using for this class:

Blog Entries


The items on this page are in the following plugins: MBS MacControls Plugin.


NSHTTPCookieMBS   -   NSImageCellMBS


The biggest plugin in space...