Reputation: 668
I want to make an HTTP GET request from my iOS client and place in the request params. I have written code that performs a POST request, where it was very easy to use setHTTPBody to place a NSData* object in the request. How is this done for a GET request?
Thanks
Upvotes: 0
Views: 88
Reputation: 114875
In a GET method the parameters are passed in the query string - so you suffix your URL with something like ?param1=value1¶m2=value2¶m3=value3. You may need to percent-encode your query string if it contains characters like space, & or =
Upvotes: 3