NSHTTPCookieMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

NSHTTPCookieMBS 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
An NSHTTPCookie object represents an HTTP cookie.
Example
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies

// we collect domain names
dim domains(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
if domains.IndexOf(cookie.domain) < 0 then
domains.Append cookie.domain
end if
next

// and display them
MsgBox "You have cookies from this domains: "+Join(domains, ", ")

It's an immutable object initialized from a dictionary containing the cookie attributes.

Two versions of cookies are supported:

Version 0: This version refers to "traditional" or "old-style" cookies, the original cookie format defined by Netscape. The majority of cookies encountered are in this format.
Version 1: This version refers to cookies as defined in RFC 2965, HTTP State Management Mechanism.

This class has no sub classes.

Some methods using this class:

Blog Entries

Release notes


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


NSHelpManagerMBS   -   NSHTTPCookieStorageMBS


💬 Ask a question or report a problem