views:

536

answers:

2

Hi,

I'm looking to build an app on the iPhone using PhoneGap. The app is an extension of another app which has a REST API.

The easiest way I can think of getting data from the remote app is using CURL. Is this possible? Or is there some other recommended method for this? The app I am pulling from is using a standard REST model and requires authentication.

Thanks!

+1  A: 

I don't know what PhoneGap is but you can't call curl from an iPhone app.

You can, very easily, use the NSURL connection system to get data over HTTP. This is covered in the documentation - read the 'URL Loading System' doc.

Hunter
+2  A: 

Use ASIHTTPRequest from All Seeing I. It is a simple framework over CFNetwork that is well suited for REST. It'll specifically help you build POST forms.

Roger Nolan