CAIServiceConfig
public struct CAIServiceConfig
CAI Service definition. Helps to connect to CAI services. By default, it will connect to Community tenant.
-
Backend host URL
Declaration
Swift
public let host: URL
-
URLSession object used to make HTTP requests
Declaration
Swift
public let urlSession: SAPURLSession
-
Developer Token
Declaration
Swift
public let developerToken: String?
-
Read-only. Returns URL with host and channel connector endpoint
Declaration
Swift
public var baseURL: URL { get }
-
Creates a new CAIServiceConfig
Declaration
Swift
public init(sessionConfiguration: URLSessionConfiguration = .default, host: URL? = nil, developerToken: String? = nil)
Parameters
sessionConfiguration
URLSessionConfiguration. Will create a SAPURLSession with this config
host
URL. Optional. If nil, our Community Tenant URL will be used
-
Creates a new CAIServiceConfig
Declaration
Swift
public init(urlSession: SAPURLSession, host: URL? = nil, developerToken: String? = nil)
Parameters
urlSession
SAPURLSession
host
URL. Optional. If nil, our Community Tenant URL will be used