SessionDelegate
open class SessionDelegate : NSObject, @unchecked Sendable
extension SessionDelegate: URLSessionDelegate
extension SessionDelegate: URLSessionTaskDelegate
extension SessionDelegate: URLSessionDataDelegate
extension SessionDelegate: URLSessionWebSocketDelegate
extension SessionDelegate: URLSessionDownloadDelegate
Class which implements the various URLSessionDelegate
methods to connect various Alamofire features.
-
Creates an instance from the given
FileManager
.Declaration
Swift
public init(fileManager: FileManager = .default)
Parameters
fileManager
FileManager
to use for underlying file management, such as moving downloaded files..default
by default.
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping @Sendable (URLSession.ResponseDisposition) -> Void)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, completionHandler: @escaping (CachedURLResponse?) -> Void)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, expectedTotalBytes: Int64)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64)
-
Undocumented
Declaration
Swift
open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL)