NetworkActivityPlugin
public final class NetworkActivityPlugin : PluginType
Notify a request’s network activity changes (request begins or ends).
-
Undocumented
Declaration
Swift
public typealias NetworkActivityClosure = (_ change: NetworkActivityChangeType, _ target: TargetType) -> Void
-
Initializes a NetworkActivityPlugin.
Declaration
Swift
public init(networkActivityClosure: @escaping NetworkActivityClosure)
-
Called by the provider as soon as the request is about to start
Declaration
Swift
public func willSend(_ request: RequestType, target: TargetType)
-
Called by the provider as soon as a response arrives, even if the request is canceled.
Declaration
Swift
public func didReceive(_ result: Result<Moya.Response, MoyaError>, target: TargetType)