Book Image

iOS and OS X Network Programming Cookbook

By : Jon Hoffman
Book Image

iOS and OS X Network Programming Cookbook

By: Jon Hoffman

Overview of this book

Table of Contents (15 chapters)
iOS and OS X Network Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Performing HTTP(S) asynchronous GET requests


In this recipe, we will create a WebServiceConnectAsynchronous class that will be able to perform an HTTP GET request asynchronously. If we follow the HTTP specifications to the letter, we would be using the HTTP GET request to retrieve data from a server. For example, when you request a web page from a server, you submit an HTTP GET request.

For an HTTP GET request, if any parameters need to be sent to the resource, they should be included in the URL. There are two primary ways to include the parameters in a GET request: