ResponseLoggerPlugin
public final class ResponseLoggerPlugin : PluginType
A Moya plugin for printing request info and string representation of the outgoing requests and received responses
-
Plugin constructor
Declaration
Swift
public init( logger: Logger, descriptors: RequestDescriptor... )Parameters
loggerLogger object that print log items
descriptorsList of request descriptors that can produce different representation of the requests
-
PluginType protocol implementation for printing outgoing request
Declaration
Swift
public func willSend(_ request: RequestType, target: TargetType)Parameters
requestRequest object
targetCurrent MoyaTarget object
-
PluginType protocol implementation for printing incoming response
Declaration
Swift
public func didReceive(_ result: Result<Response, MoyaError>, target: TargetType)Parameters
resultResult object
targetCurrent MoyaTarget object
ResponseLoggerPlugin Class Reference