NSURLSession class Hierarchy
NSURLSession class Hierarchy
- NSURLSession – First we need to create object of NSURLSession class i.e A Session Object.
- NSURLSessionConfiguration – A Configuration object used when initializing the object.
- NSURLSessionTask – A base class for within a session. >>NSURLSessionDataTask – A Task for retrieving a contents of a URL as anNSData Object >NSURLSessionUploadTask – A Task for uploading a file, then retrieving the contents of a URL as an NSData Object >>NSURLSessionDownloadTask – A task for retrieving the content of a URL as a temporary file on disk.
- NSURLSession API provide 4 protocol,that define delegate method for your app to more option to session task
- NSURLSessionDelegate – Define the delegate method to handle session-level events
- NSURLSessionTaskDelegate – Define the delegate method to handle task-level events common to all task type.
- NSURLSessionDataDelegate – Define delegate method to handle task-level events specific to data and upload task
- NSURLSessionDownloadDelegate – Define delegate method to handle task – level specific to download content
- NSURLSession need this class also. (1) NSURL – Create object type of NSURL (2) NSURLRequest – Encapsulate metadata related to a URL request. including the URL, request method, and so on. (3) NSURLResponse – Encapsulate metadata related to a servers response’s to a request such as the content MIME (Multi-Purpose Internet Mail Extension) type and length . (*3) NSHTTPURLResponse – Add additional metadata specific to HTTP request. (4) NSCachedURLResponse – Encapsulate NSURLResponse object, along with the actual body data of the server’s response for caching purpose.
- For More Information Please Visit
|
NSURLSession Class |
No comments:
Post a Comment