WHAT’S IN THIS CHAPTER?
- Understanding the structure of HTTP requests
- Issuing HTTP requests from iOS applications
- Using advanced manipulation of HTTP requests
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter at www.wrox.com/WileyCDA/WroxTitle/Professional-iOS-Network-Programming-Connecting-the-Enterprise-to-the-iPhone-and-iPad.productCd-1118362403.html on the Download Code tab. The code is in the Chapter 3 download and individually named according to the names throughout the chapter.
As you may have noticed from the content of previous chapters, the preferred communication approach in iOS is HTTP. The most convenient networking APIs provided in iOS are geared toward HTTP, the HTTP APIs are the most thoroughly documented, and the high level HTTP APIs are well integrated into the run loop-based architecture of an iOS application. It is no wonder that HTTP and HTTPS are the workhorse protocols of iOS network communications.
In this chapter you learn about the structure of HTTP requests and how these requests can be leveraged by your application. The chapter also provides concrete examples of three primary methods to generate HTTP requests and receive HTTP responses and recommendations on when to use or avoid each one. Finally, this chapter explores some more advanced ways to use the HTTP protocol to your advantage.