NetworkManager
@objc(SFMCSdkNetworkManager)
open class NetworkManager : NSObject
This class is a helper for making synchronous and asynchronous network calls with an optional authenticator.
- Tag: NetworkManager
-
Declaration
Swift
@objc public init(networkPreferences: SecurePrefs, authenticator: Authenticator?) -
Executes synchronous network call.
Declaration
Swift
@objc open func executeSync(_ wrappedRequest: WrappedRequest) -> CompletedCallParameters
wrappedRequestinstance of WrappedRequest
Return Value
instance of CompletedCall that contains both the request and the response
-
Executes aynchronous network call.
Declaration
Swift
@objc open func executeAsync(_ wrappedRequest: WrappedRequest, completionHandler: @escaping (CompletedCall) -> Void)Parameters
wrappedRequestinstance of WrappedRequest
completionHandlercallback on response
-
Temporarily blocks retries of given request. Waiting time is stored in the network preferences under the requests name key.
Declaration
Swift
@objc open func isBlockedByRetryAfter(_ requestName: String) -> BoolParameters
requestNameName of the request
Return Value
Bool
NetworkManager Class Reference