O'Reilly logo

iOS and OS X Network Programming Cookbook by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing HTTP(S) synchronous GET requests

In this recipe, we will create a WebServiceConnectSynchronous class that will be able to perform the HTTP GET requests. In the next recipe, Performing HTTP(S) synchronous POST requests, we will add a method to perform POST requests. If we follow the HTTP specifications to the letter, we would use the HTTP GET request to retrieve data from a server. For example, when you request a web page from a server, you submit a GET request to the server, requesting that the web page be sent to you. If you want to send information to the server, like filling out a form, you would want to submit a POST request.

For an HTTP GET request, if any parameters need to be sent to the service, they should be included in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required