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 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.