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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access