Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSHTTPCookieMBS class

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
Function: 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, ", ")
Notes:
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.

Feedback, Comments & Corrections

This class has no sub classes.

Some methods using this class:

Some examples which use this class:


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


NSHelpManagerMBS   -   NSHTTPCookieStorageMBS




Links
MBS FileMaker tutorial videos