RequestDelegate
public protocol RequestDelegate
Represents a RequestDelegate
that is associated with Requestable
.
-
prepare(_:requestable:)
Default implementationCalled to modify a request before sending.
Default Implementation
No-op
Declaration
Swift
func prepare<R>(_ request: URLRequest, requestable: R) -> URLRequest where R : BaseRequestable
-
willSend(_:requestable:)
Default implementationCalled before the request is sent over the network.
Default Implementation
No-op
Declaration
Swift
func willSend<R>(_ request: Request, requestable: R) where R : BaseRequestable
-
didSend(_:requestable:)
Default implementationCalled when the request is sent over the network.
Default Implementation
No-op
Declaration
Swift
func didSend<R>(_ request: Request, requestable: R) where R : BaseRequestable
-
process(_:requestable:response:)
Default implementationCalled before the request calls its completion handler.
Default Implementation
No-op
Declaration
Swift
func process<R>(_ request: Request, requestable: R, response: DataResponse<R.Response>) -> DataResponse<R.Response> where R : Requestable
-
Called before the request calls its completion handler.
Declaration
Swift
func process<R>(_ request: Request, requestable: R, response: DownloadResponse<R.Response>) -> DownloadResponse<R.Response> where R : Downloadable
-
Called before the request calls its completion handler.
Declaration
Swift
func process<R>(_ request: Request, requestable: R, response: DataResponse<R.Response>) -> DataResponse<R.Response> where R : Uploadable