ProtocolFoundationNetworking5.9.0
URLSessionDataDelegate
protocol URLSessionDataDelegate : URLSessionTaskDelegate
Supertypes
protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.protocol URLSessionDelegate
protocol URLSessionTaskDelegate
Requirements
func urlSession(URLSession, dataTask: URLSessionDataTask, didBecome: URLSessionStreamTask
) func urlSession(URLSession, dataTask: URLSessionDataTask, didBecome: URLSessionDownloadTask
) func urlSession(URLSession, dataTask: URLSessionDataTask, didReceive: Data
) func urlSession(URLSession, dataTask: URLSessionDataTask, didReceive: URLResponse, completionHandler: (URLSession.ResponseDisposition) -> Void
) The task has received a response and no further messages will be received until the completion block is called. The disposition allows you to cancel a request or to turn a data task into a download task. This delegate message is - if you do not implement it, you can get the response as a property of the task.
func urlSession(URLSession, dataTask: URLSessionDataTask, willCacheResponse: CachedURLResponse, completionHandler: (CachedURLResponse?) -> Void
)