In latest apple introduce new NSURLSession
in replace of NSURLConnection
, so in there are different task , so what is the difference between
We can get it from header files
/* * An NSURLSessionDataTask does not provide any additional * functionality over an NSURLSessionTask and its presence is merely * to provide lexical differentiation from download and upload tasks. */
@interface NSURLSessionDataTask : NSURLSessionTask
@end
/* * An NSURLSessionUploadTask does not currently provide any additional * functionality over an NSURLSessionDataTask. All delegate messages * that may be sent referencing an NSURLSessionDataTask equally apply * to NSURLSessionUploadTasks. */
@interface NSURLSessionUploadTask : NSURLSessionDataTask
@end
/* * NSURLSessionDownloadTask is a task that represents a download to * local storage. */
@interface NSURLSessionDownloadTask : NSURLSessionTask