CachingHTTPClient

class CachingHTTPClient : AppConfigurationFetching

Undocumented

  • The client configuration - mostly server endpoints per environment

    Declaration

    Swift

    let configuration: HTTPClient.Configuration
  • The underlying URLSession for all network requests

    Declaration

    Swift

    let session: URLSession
  • Verifier for the fetched & signed protobuf packages

    Declaration

    Swift

    let packageVerifier: SAPDownloadedPackage.Verifier
  • Initializer for the caching client.

    Declaration

    Swift

    init(
    	clientConfiguration: HTTPClient.Configuration,
    	session: URLSession = URLSession(configuration: .cachingSessionConfiguration()),
    	packageVerifier: SAPDownloadedPackage.Verifier = SAPDownloadedPackage.Verifier())

    Parameters

    clientConfiguration

    The client configuration for the client.

    session

    An optional session to use for network requests. Default is based on a predefined configuration.

    packageVerifier

    The verifier to use for package validation.

AppConfigurationFetching

  • Fetches an application configuration file

    Declaration

    Swift

    func fetchAppConfiguration(etag: String? = nil, completion: @escaping AppConfigResultHandler)

    Parameters

    etag

    an optional ETag to download only versions that differ the given tag

    completion

    result handler