Network

  • Protocol for sending network requests and handling responses.

    See more

    Declaration

    Swift

    public protocol NetworkClient
  • 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.

    See more

    Declaration

    Swift

    public struct NetworkConfiguration
  • The connection as it’s reported by the system monitors

    See more

    Declaration

    Swift

    public enum NetworkConnection : Equatable
  • An error returned from an http request.

    See more

    Declaration

    Swift

    public struct NetworkError : Error
  • An error reported by the NetworkClient.

    See more

    Declaration

    Swift

    public enum NetworkErrorType : Error, ErrorEnum
  • Protocol defining methods for common, uncompressed network operations.

    Implementations are a short-circuit for standard requests only; bodies are never compressed. For gzip or otherwise customized requests, use NetworkClient with a RequestBuilder.

    See more

    Declaration

    Swift

    public protocol NetworkHelperProtocol
  • A successful response returned by the NetworkClient

    See more

    Declaration

    Swift

    public struct NetworkResponse
  • NetworkResult From TealiumPrismCore

    A successful Result with a NetworkResponse or a failed Result with NetworkError, returned by the NetworkClient

    Declaration

    Swift

    public typealias NetworkResult = Result<NetworkResponse, NetworkError>
  • Groups the networking utilities for a given Tealium instance onto a single object.

    See more

    Declaration

    Swift

    public final class NetworkUtilities
  • A manager that handles system connectivity monitor and empirical connectivity monitor to establish when connectivity is actually available or not on the device.

    The default behavior would be to always assume that connectivity is available until system monitor or empirical connectivity result unavailable or unknown.

    See more

    Declaration

    Swift

    public class ConnectivityManager : ConnectivityManagerProtocol, RequestInterceptor
  • Protocol for managing network connectivity state and monitoring.

    See more

    Declaration

    Swift

    public protocol ConnectivityManagerProtocol
  • An interceptor that retries all retriable errors

    See more

    Declaration

    Swift

    public class DefaultInterceptor : RequestInterceptor
  • Protocol for managing request interceptors and handling network results.

    See more

    Declaration

    Swift

    public protocol InterceptorManagerProtocol : URLSessionTaskDelegate
  • Protocol for intercepting and handling network requests and responses.

    See more

    Declaration

    Swift

    public protocol RequestInterceptor : AnyObject
  • Parameters for configuring a resource refresher.

    See more

    Declaration

    Swift

    public struct RefreshParameters
  • An object that refreshes a single resource at regular intervals.

    Refresh is requested by the user of ths class, but it’s ignored unless the required intervals have passed. The resource is cached locally and it’s re-read only on initialization or when subscribing onResourceLoaded.

    You can listen to resource updates by using the onResourceLoaded observable. This will first push an event with a resource read from disk, if present, and then all refreshes from remote.

    See more

    Declaration

    Swift

    public class ResourceRefresher<Resource> where Resource : Decodable, Resource : Encodable
  • A builder for URLRequests to send through a NetworkClient.

    Use the makePOST(url:json:) / makeGET(url:etag:) factories to start a request, chain the builder methods to configure it, and hand the builder to NetworkClient.sendRequest(_:completion:) (which builds it for you). Request bodies are uncompressed by default; opt into gzip compression with gzip().

    See more

    Declaration

    Swift

    public class RequestBuilder
    extension RequestBuilder: CustomStringConvertible
  • A storage to persist a resource and it’s etag, when available.

    Resource is stored in the DataStore at the provided fileName, while the etag will be stored at \(fileName)_etag

    See more

    Declaration

    Swift

    public class ResourceCacher<Resource> where Resource : Decodable, Resource : Encodable
  • The policy, returned by a RequestInterceptor that the NetworkClient should apply on a given NetworkResponse.

    See more

    Declaration

    Swift

    public enum RetryPolicy
  • URL

    Declaration

    Swift

    From TealiumPrismCore:
    extension URL: URLConvertible
  • Declaration

    Swift

    From TealiumPrismCore:
    extension URLComponents: URLConvertible
  • A protocol used to receive requests with String/URL/URLComponents intercheangebly

    See more

    Declaration

    Swift

    public protocol URLConvertible
  • ErrorCooldown From TealiumPrismCore

    An object that increases a cooldown for every error event, and resets the cooldown to 0 when a non-error event happens.

    Declaration

    Swift

    public class ErrorCooldown
  • A response containing a decoded object and the HTTP response.

    See more

    Declaration

    Swift

    public struct ObjectResponse<T>
  • ObjectResult From TealiumPrismCore

    A result type for object responses.

    Declaration

    Swift

    public typealias ObjectResult<T> = Result<ObjectResponse<T>, NetworkError>