Getsy
Getsy

Reputation: 4905

iPhone: Input array of data in an URL api?

I would like to know how can I input array of data in an URL API in iPhone development project?

For ex: I know how to input just strings like below,

http://www.myserver.com/myservice/name="MyName"?date="SomeDate"&time="SomeTime";

But I need to send array of name, date and time here, not just one. So, how can I send array of data in an URL api?

Please advise!

Thank you!

Upvotes: 1

Views: 373

Answers (1)

bryanmac
bryanmac

Reputation: 39296

You can send an http post with xml or json data.

One way is ASIHTTPRequest: http://allseeing-i.com/ASIHTTPRequest/

Here's some samples showing post and other HTTP verbs: http://allseeing-i.com/ASIHTTPRequest/How-to-use

You can also post data using NSURLConnection directly: http://www.deanoj.co.uk/ios-development/making-a-http-post-request-with-nsurlconnection/

Upvotes: 3

Related Questions