Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSHTTPCookieMBS class.
NSHTTPCookieMBS.cookiesWithResponseHeaderFields(headerFields as dictionary, URL as string) as NSHTTPCookieMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
headerFields: The header fields used to create the NSHTTPCookie objects.
URL: The URL associated with the created cookies.
Returns the array of created cookies.
This method ignores irrelevant header fields in headerFields, allowing dictionaries to contain additional data.
If headerFields does not specify a domain for a given cookie, the cookie is created with a default domain value of theURL.
If headerFields does not specify a path for a given cookie, the cookie is created with a default path value of "/".
NSHTTPCookieMBS.cookieWithProperties(dic as dictionary) as NSHTTPCookieMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
dic: The properties for the new cookie object, expressed as key value pairs.
Returns the newly created cookie object. Returns nil if the provided properties are invalid.
See NSHTTPCookie* shared method for more information on the available header field constants and the constraints imposed on the values in the dictionary.
NSHTTPCookieMBS.NSHTTPCookieComment as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the comment for the cookie.
Only valid for Version 1 cookies and later. This header field is optional.
NSHTTPCookieMBS.NSHTTPCookieCommentURL as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the comment URL for the cookie.
Only valid for Version 1 cookies or later. This header field is optional.
NSHTTPCookieMBS.NSHTTPCookieDiscard as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String stating whether the cookie should be discarded at the end of the session.
String value must be either "TRUE" or "FALSE". This header field is optional. Default is "FALSE", unless this is cookie is version 1 or greater and a value for NSHTTPCookieMaximumAge is not specified, in which case it is assumed "TRUE".
NSHTTPCookieMBS.NSHTTPCookieDomain as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the domain for the cookie.
A value must be specified for either NSHTTPCookieDomain or NSHTTPCookieOriginURL. If this header field is missing the domain is inferred from the value for NSHTTPCookieOriginURL.
NSHTTPCookieMBS.NSHTTPCookieExpires as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An Date object or String specifying the expiration date for the cookie.
This header field is only used for Version 0 cookies. This header field is optional.
NSHTTPCookieMBS.NSHTTPCookieMaximumAge as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing an integer value stating how long in seconds the cookie should be kept, at most.
Only valid for Version 1 cookies and later. Default is "0". This field is optional.
NSHTTPCookieMBS.NSHTTPCookieName as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String object containing the name of the cookie. This field is required.
NSHTTPCookieMBS.NSHTTPCookieOriginURL as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the URL that set this cookie.
A value must be specified for either NSHTTPCookieDomain or NSHTTPCookieOriginURL.
NSHTTPCookieMBS.NSHTTPCookiePath as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the path for the cookie. This field is required if you are using the NSHTTPCookieDomain key instead of the NSHTTPCookieOriginURL key.
If you are using the NSHTTPCookieOriginURL key, the path is inferred if it is not provided. The default value is "/".
NSHTTPCookieMBS.NSHTTPCookiePort as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing comma-separated integer values specifying the ports for the cookie.
Only valid for Version 1 cookies or later. The default value is an empty string (""). This header field is optional.
NSHTTPCookieMBS.NSHTTPCookieSecure as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String indicating that the cookie should be transmitted only over secure channels.
Providing any value for this key indicates that the cookie should remain secure.
NSHTTPCookieMBS.NSHTTPCookieValue as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String containing the value of the cookie.
This header field is required.
NSHTTPCookieMBS.NSHTTPCookieVersion as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An String that specifies the version of the cookie.
Must be either "0" or "1". The default is "0". This header field is optional.
NSHTTPCookieMBS.requestHeaderFieldsWithCookies(cookies() as NSHTTPCookieMBS) as dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Networking | MBS MacControls Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
cookies: The cookies from which the header fields are created.
Returns the dictionary of header fields created from the provided cookies. This dictionary can be used to add cookies to a request.
The items on this page are in the following plugins: MBS MacControls Plugin.