Instance Property


The cookie store for storing cookies within this session.


var httpCookieStorage: HTTPCookieStorage? { get set }


This property determines the cookie storage object used by all tasks within sessions based on this configuration.

To disable cookie storage, set this property to nil.

For default and background sessions, the default value is the shared cookie storage object.

For ephemeral sessions, the default value is a private cookie storage object that stores data in memory only, and is destroyed when you invalidate the session.

See Also

Setting Cookie Policies

var httpCookieAcceptPolicy: HTTPCookie.AcceptPolicy

A policy constant that determines when cookies should be accepted.

var httpShouldSetCookies: Bool

A Boolean value that determines whether requests should contain cookies from the cookie store.

class HTTPCookieStorage

A container that manages the storage of cookies.

class HTTPCookie

A representation of an HTTP cookie.