Sending the Request
A URL request encapsulates information about the communication from the application to the server. Most importantly, it specifies the URL of the server for the request, but it also has a timeout interval, a cache policy, and other metadata about the request. A request is represented by the NSURLRequest class. Check out the For the More Curious section at the end of this chapter for more information.
The NSURLSession API is a collection of classes that use a request to communicate with a server in a number of ways. The NSURLSessionTask class is responsible for communicating with a server. The NSURLSession class is responsible for creating tasks that match a given configuration.
A new class, PhotoStore, will be ...
Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.