-
willSendRequest(_:
Default implementation) Notifies that
request
is about to be converted to Alamofire.RequestDefault Implementation
Declaration
Swift
func willSendRequest<Model, ErrorModel>(_ request: BaseRequest<Model, ErrorModel>)
Parameters
request
TRON BaseRequest
-
willSendAlamofireRequest(_:
Default implementationformedFrom: ) Notifies that
request
formed fromtronRequest
, is about to be sent.Default Implementation
Declaration
Swift
func willSendAlamofireRequest<Model, ErrorModel>(_ request: Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
request
Alamofire.Request instance
formedFrom
TRON.BaseRequest instance or one of the subclasses
-
didSendAlamofireRequest(_:
Default implementationformedFrom: ) Notifies that
request
, formed fromtronRequest
, was sent.Default Implementation
Declaration
Swift
func didSendAlamofireRequest<Model, ErrorModel>(_ request: Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
willProcessResponse(response:
Default implementationforRequest: formedFrom: ) Notifies that
response
was received forrequest
, formed fromtronRequest
.Default Implementation
Declaration
Swift
func willProcessResponse<Model, ErrorModel>(response: (URLRequest?, HTTPURLResponse?, Data?, Error?), forRequest request: Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
response
Tuple with (URLRequest?, HTTPURLResponse?, Data?, Error?)
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
didSuccessfullyParseResponse(_:
Default implementationcreating: forRequest: formedFrom: ) Notifies that
response
forrequest
, formed fromtronRequest
, was successfully parsed intoresult
.Default Implementation
Declaration
Swift
func didSuccessfullyParseResponse<Model, ErrorModel>(_ response: (URLRequest?, HTTPURLResponse?, Data?, Error?), creating result: Model, forRequest request: Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
response
Tuple with (URLRequest?, HTTPURLResponse?, Data?, Error?)
result
parsed Model
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
didReceiveError(_:
Default implementationforResponse: request: formedFrom: ) Notifies that request processed response and created
APIError<ErrorModel>
instance.Default Implementation
Declaration
Swift
func didReceiveError<Model, ErrorModel: ErrorSerializable>(_ error: ErrorModel, forResponse response: (URLRequest?, HTTPURLResponse?, Data?, Error?), request: Alamofire.Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
error
parsed APIError
instance response
Tuple with (URLRequest?, HTTPURLResponse?, Data?, Error?)
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
didReceiveDownloadError(_:
Default implementationforResponse: request: formedFrom: ) Notifies that request processed response and created
APIError<ErrorModel>
instance.Default Implementation
Declaration
Swift
func didReceiveDownloadError<Model, ErrorModel: DownloadErrorSerializable>(_ error: ErrorModel, forResponse response: (URLRequest?, HTTPURLResponse?, URL?, Error?), request: Alamofire.Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
error
parsed APIError
instance response
Tuple with (URLRequest?, HTTPURLResponse?, URL?, Error?)
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
didReceiveDataResponse(_:
Default implementationforRequest: formedFrom: ) Notifies about data
response
that was received forrequest
, formed fromtronRequest
. This method is called after parsing has completed.Default Implementation
Declaration
Swift
func didReceiveDataResponse<Model, ErrorModel>(_ response: DataResponse<Model, AFError>, forRequest request: Alamofire.Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
response
DataResponse instance
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses
-
didReceiveDownloadResponse(_:
Default implementationforRequest: formedFrom: ) Notifies about download
response
that was received forrequest
, formed fromtronRequest
. This method is called after parsing has completed.Default Implementation
Declaration
Swift
func didReceiveDownloadResponse<Model, ErrorModel: DownloadErrorSerializable>(_ response: DownloadResponse<Model, AFError>, forRequest request: Alamofire.DownloadRequest, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
_response
DownloadResponse instance
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses.
-
didSuccessfullyParseDownloadResponse(_:
Default implementationcreating: forRequest: formedFrom: ) Notifies that
response
forrequest
, formed fromtronRequest
, was successfully parsed intoresult
.Default Implementation
Declaration
Swift
func didSuccessfullyParseDownloadResponse<Model, ErrorModel: DownloadErrorSerializable>(_ response: (URLRequest?, HTTPURLResponse?, URL?, Error?), creating result: Model, forRequest request: Request, formedFrom tronRequest: BaseRequest<Model, ErrorModel>)
Parameters
response
Tuple with (URLRequest?, HTTPURLResponse?, URL?, Error?)
result
parsed Model
request
Alamofire.Request instance
tronRequest
TRON.BaseRequest or one of the subclasses