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 URLRequest class. Check out the For the More Curious section at the end of this chapter for more information.

The URLSession API is a collection of classes that use a request to communicate with a server in a number of ways. The URLSessionTask class is responsible for communicating with a server. The URLSession class is responsible for creating tasks that match a given configuration.

In Photorama, a new class, PhotoStore ...

Get iOS Programming: The Big Nerd Ranch Guide, 6th Edition 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.