docs/Protocols/RequestDelegate.html
public protocol RequestDelegate : AnyObject, Sendable
Protocol abstraction for Request‘s communication back to the SessionDelegate.
`
sessionConfiguration
`
URLSessionConfiguration used to create the underlying URLSessionTasks.
Swift
var sessionConfiguration: URLSessionConfiguration { get }
`
startImmediately
`
Determines whether the Request should automatically call resume() when adding the first response handler.
Swift
var startImmediately: Bool { get }
`
readyToPerform(request:)
`
Undocumented
Swift
func readyToPerform(request: Request)
`
cleanup(after:)
`
Notifies the delegate the Request has reached a point where it needs cleanup.
Swift
func cleanup(after request: Request)
| request |
The Request to cleanup after.
|
`
retryResult(for:dueTo:completion:)
`
Asynchronously ask the delegate whether a Request will be retried.
Swift
func retryResult(for request: Request, dueTo error: AFError, completion: @escaping @Sendable (RetryResult) -> Void)
| request |
Request which failed.
|
| error |
Error which produced the failure.
|
| completion |
Closure taking the RetryResult for evaluation.
|
`
retryRequest(_:withDelay:)
`
Asynchronously retry the Request.
Swift
func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?)
| request |
Request which will be retried.
|
| timeDelay |
TimeInterval after which the retry will be triggered.
|