HTTPCookie
HTTPCookie is a class in Apple's Foundation framework that models an HTTP cookie. Cookies are small data pieces used by servers to maintain state, preferences, or tracking information between a client and a server. An HTTPCookie encapsulates both the cookie’s name and value and its associated metadata, such as the domain and path for which the cookie is valid, an expiration date, and security attributes.
Core properties typically exposed by HTTPCookie include name, value, domain, path, expiresDate (or the absence of
Creation and parsing: HTTPCookie can be instantiated from a dictionary of properties using an initializer, where
Storage and usage: Cookies are stored in HTTPCookieStorage.shared and are associated with particular URLs. You can
Security and lifecycle: The isSecure flag ensures cookies are transmitted only over secure connections, and isHttpOnly