RequestDelegate
public protocol RequestDelegate : AnyObject, Sendable
Protocol abstraction for Request
‘s communication back to the SessionDelegate
.
-
URLSessionConfiguration
used to create the underlyingURLSessionTask
s.Declaration
Swift
var sessionConfiguration: URLSessionConfiguration { get }
-
Determines whether the
Request
should automatically callresume()
when adding the first response handler.Declaration
Swift
var startImmediately: Bool { get }
-
Asynchronously ask the delegate whether a
Request
will be retried.Declaration
Swift
func retryResult(for request: Request, dueTo error: AFError, completion: @escaping @Sendable (RetryResult) -> Void)
Parameters
request
Request
which failed.error
Error
which produced the failure.completion
Closure taking the
RetryResult
for evaluation.