Chapter 28. Web Service

Web services are getting a lot of hype. In the end, however, they are simply an HTTP request and response whereby each may be carrying XML data. So using a Web service from Cocoa is simply a matter of being able to send HTTP requests and receive responses. It also may require generating and parsing XML. See Figure 28.1.

Your Average Web Service in Action

Figure 28.1. Your Average Web Service in Action

HTTP requests and responses are handled by NSURL, NSURLRequest, and NSURLConnection (Figure 28.2).

Classes for Making HTTP Requests

Figure 28.2. Classes for Making HTTP Requests

Generating and parsing ...

Get Cocoa Programming for Mac OS X, Third Edition now with O’Reilly online learning.

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