docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionDelegate.html
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.
`
init(fileManager:)
`
Creates an instance from the given FileManager.
Swift
public init(fileManager: FileManager = .default)
| fileManager |
FileManager to use for underlying file management, such as moving downloaded files. .default by default.
|
`
urlSession(_:didBecomeInvalidWithError:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?)
`
urlSession(_:task:didReceive:completionHandler:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
task: URLSessionTask,
didReceive challenge: URLAuthenticationChallenge,
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
`
urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
task: URLSessionTask,
didSendBodyData bytesSent: Int64,
totalBytesSent: Int64,
totalBytesExpectedToSend: Int64)
`
urlSession(_:task:needNewBodyStream:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
task: URLSessionTask,
needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
`
urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
task: URLSessionTask,
willPerformHTTPRedirection response: HTTPURLResponse,
newRequest request: URLRequest,
completionHandler: @escaping (URLRequest?) -> Void)
`
urlSession(_:task:didFinishCollecting:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)
`
urlSession(_:task:didCompleteWithError:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?)
`
urlSession(_:taskIsWaitingForConnectivity:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask)
`
urlSession(_:dataTask:didReceive:completionHandler:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
dataTask: URLSessionDataTask,
didReceive response: URLResponse,
completionHandler: @escaping @Sendable (URLSession.ResponseDisposition) -> Void)
`
urlSession(_:dataTask:didReceive:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
`
urlSession(_:dataTask:willCacheResponse:completionHandler:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
dataTask: URLSessionDataTask,
willCacheResponse proposedResponse: CachedURLResponse,
completionHandler: @escaping (CachedURLResponse?) -> Void)
`
urlSession(_:webSocketTask:didOpenWithProtocol:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?)
`
urlSession(_:webSocketTask:didCloseWith:reason:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?)
`
urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
downloadTask: URLSessionDownloadTask,
didResumeAtOffset fileOffset: Int64,
expectedTotalBytes: Int64)
`
urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession,
downloadTask: URLSessionDownloadTask,
didWriteData bytesWritten: Int64,
totalBytesWritten: Int64,
totalBytesExpectedToWrite: Int64)
`
urlSession(_:downloadTask:didFinishDownloadingTo:)
`
Undocumented
Swift
open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL)