UnbluCookie
struct UnbluCookie
A struct representing HTTPCookies to be used within Unblu. Use this when you want to pass your own Cookies to Unblu when configuring the SDK.
There are 2 ways to initialize an UnbluCookie:
- You can initialize by passing in an
HTTPCookie - You can initialize by passing in individual properties.
Both approaches are equally valid.
-
Initializes the
UnbluCookieusing specific properties.Initializing an
UnbluCookielike so:UnbluCookie(name: "id", value: "123") // when passed in an HTTP request yields "id=123"Declaration
Swift
init(name: String, value: String, expiryDate: Date? = nil)Parameters
nameThe “name” of the Cookie.
valueThe “value” of the Cookie.
expiryDateThe “expiresDate” of the Cookie.
-
Initializes the
UnbluCookiewith anHTTPCookie.Declaration
Swift
init(httpCookie: HTTPCookie)Parameters
httpCookieThe
HTTPCookieto initialize the object with.