NetworkConfiguration Structure Reference
public struct NetworkConfiguration
The configuration that is used by the NetworkClient to customize it’s behavior.
You almost never need to change this as most of the Networking should happen via the shared NetworkingClient instance.
If you need to add new interceptors you can do that directly on the NetworkClient.
In case you really want to create a new client, start off from the NetworkConfiguration.defaultand edit it.
Make sure to use a URLSessionConfiguration without cache and make sure to have at least the default interceptors.
-
Creates a network configuration with the specified parameters.
Declaration
Swift
public init(sessionConfiguration: URLSessionConfiguration, interceptors: [RequestInterceptor], interceptorManagerFactory: InterceptorManagerProtocol.Type = InterceptorManager.self, queue: TealiumQueue)Parameter Description sessionConfigurationThe URL session configuration to use.
interceptorsThe request interceptors to apply.
interceptorManagerFactoryThe factory for creating interceptor managers.
queueThe queue for network operations.
-
The default URL session configuration for network requests.
Declaration
Swift
static var defaultUrlSessionConfiguration: URLSessionConfiguration { get } -
The default set of request interceptors.
Declaration
Swift
static let defaultInterceptors: [RequestInterceptor] -
Creates and returns a new
NetworkConfigurationwith default parameters.Declaration
Swift
static var `default`: NetworkConfiguration { get }