O'Reilly logo

Mastering Swift 4 - Fourth Edition by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apple's URL loading system

Apple's URL loading system is a framework of classes available to interact with URLs. We generally use these classes to communicate with services that use standard internet protocols. The classes that we will be using in this section are as follows:

  • URLSession: This is the main session object.
  • URLSessionConfiguration: This is used to configure the behavior of the URLSession object.
  • URLSessionTask: This is a base class to handle the data being retrieved from the URL. Apple provides three concrete subclasses of the URLSessionTask class.
  • URL: This is an object that represents the URL to connect to.
  • URL6Request: This class contains information about the request that we are making and is used by the URLSessionTask

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required