You want to send a GET request over the HTTP protocol and perhaps pass parameters along your request to the receiver.
By convention, GET requests allow parameters through query strings of the familiar form:
You can use strings to provide the parameters in the conventional format.
A GET request is a request to a web server to retrieve data. The request usually carries some parameters, which are sent in a query string as part of the URL.
In order to test a GET call, you need to find a web server that accepts the GET method and can send you some data back. This is simple. You may already know that when you open a web page in your browser, your browser by default sends a GET request to that end point, so you can use this recipe on any website of your liking.
To simulate sending query string parameters in a GET request
to the same web service using
NSURLConnection, use a mutable URL request and
explicitly specify your HTTP method to
GET using the
setHTTPMethod: method of
NSMutableURLRequest and put your parameters as
part of the URL, like so: