- 
                  
                  
The name of the cookie.
Declaration
Swift
public var name: String - 
                  
                  
The cookie’s string value.
Declaration
Swift
public var value: String - 
                  
                  
The cookie’s path.
Declaration
Swift
public var path: String - 
                  
                  
The domain of the cookie.
Declaration
Swift
public var domain: String? - 
                  
                  
The cookie’s expiration date.
Declaration
Swift
public var expires: Date? - 
                  
                  
The cookie’s age in seconds.
Declaration
Swift
public var maxAge: Int? - 
                  
                  
Whether the cookie should only be sent to HTTP servers.
Declaration
Swift
public var httpOnly: Bool - 
                  
                  
Whether the cookie should only be sent over secure channels.
Declaration
Swift
public var secure: Bool - 
                  
                  
Create a Cookie by parsing a
Set-Cookieheader.Declaration
Swift
public init?(header: String, defaultDomain: String)Parameters
headerString representation of the
Set-Cookieresponse header.defaultDomainDefault domain to use if cookie was sent without one.
Return Value
nil if the header is invalid.
 - 
                  
                  
Create HTTP cookie.
Declaration
Swift
public init(name: String, value: String, path: String = "/", domain: String? = nil, expires: Date? = nil, maxAge: Int? = nil, httpOnly: Bool = false, secure: Bool = false)Parameters
nameThe name of the cookie.
valueThe cookie’s string value.
pathThe cookie’s path.
domainThe domain of the cookie, defaults to nil.
expiresThe cookie’s expiration date, defaults to nil.
maxAgeThe cookie’s age in seconds, defaults to nil.
httpOnlyWhether this cookie should be used by HTTP servers only, defaults to false.
secureWhether this cookie should only be sent using secure channels, defaults to false.
 
            View on GitHub
          
            Install in Dash
          
      Cookie Structure Reference