Open ClassFoundationNetworking5.9.0
HTTPCookie
HTTPCookie
represents an http cookie.
class HTTPCookie
An HTTPCookie
instance represents a single http cookie. It is an immutable object initialized from a dictionary that contains the various cookie attributes. It has accessors to get the various attributes of a cookie.
Superclasses
class NSObject
The root class of most Foundation class hierarchies.
Citizens in FoundationNetworking
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Members
init?(properties: [HTTPCookiePropertyKey : Any]
) Initialize a HTTPCookie object with a dictionary of parameters
class func cookies(withResponseHeaderFields: [String : String], for: URL
) -> [HTTPCookie] Return an array of cookies parsed from the specified response header fields and URL.
class func requestHeaderFields(with: [HTTPCookie]
) -> [String : String] Return a dictionary of header fields that can be used to add the specified cookies to the request.
var comment: String?
The comment of the receiver.
var commentURL: URL?
var description: String
var domain: String
The domain of the receiver.
var expiresDate: Date?
var isHTTPOnly: Bool
Whether the receiver should only be sent to HTTP servers per RFC 2965
var isSecure: Bool
Whether the receiver should be sent only over secure channels
var isSessionOnly: Bool
Whether the receiver is session-only.
var name: String
The name of the receiver.
var path: String
The path of the receiver.
var portList: [NSNumber]?
The list ports to which the receiver should be sent.
var properties: [HTTPCookiePropertyKey : Any]?
Returns a dictionary representation of the receiver.
var value: String
The value of the receiver.
var version: Int
The version of the receiver.
enum AcceptPolicy