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