A representation of an HTTP cookie.
SDKs
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
class HTTPCookie : NSObject
Overview
An HTTPCookie
object is immutable, initialized from a dictionary that contains the attributes of the cookie. This class supports two different cookie versions:
Version 0: The original cookie format defined by Netscape. Most cookies are in this format.
Version 1: The cookie format defined in RFC 6265, HTTP State Management Mechanism.