Creating a web client using AFHTTPSessionManager

In this recipe, we will be subclassing AFHTTPSessionManger to create a class that can be used to access the iTunes Search API. This class will be reliant on Apple's NSURLSessionConfiguration and NSURLSessionDataTask classes to implement the network functionality. Therefore, the minimum system requirements for this recipe will be iOS 7 or Mac OS X 10.9.

The AFHTTPSessionManager class is a subclass of AFURLSessionManager that contains methods for making standard HTTP requests, such as GET, POST, and DELETE. When we set the baseURL property, these HTTP requests will be made using relative paths. In this recipe, we will be setting the baseURL property to; therefore, all HTTP ...

Get iOS and OS X Network Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.