iPhone REST client [closed]

2019-01-10 06:59发布

Does anybody know is there any good library for iPhone SDK to call REST web service. I want to have something simple like Heroku rest client


Thx everybody for help.

My server side is on Rails so looks like ObjectiveResource feet best of my needs.

9条回答
在下西门庆
2楼-- · 2019-01-10 07:03

Take a look at RestKit: http://restkit.org/ It provides an excellent API for accessing RESTful web services and representing the remote resources as local objects, including persisting them to Core Data. It's fully asynchronous and sports a lot of other slick features

查看更多
Evening l夕情丶
3楼-- · 2019-01-10 07:06

Using REST based services really doesn't need a "good library."

NSURLConnection and NSURLRequest, included in the SDK, are all you really need.

查看更多
爷、活的狠高调
4楼-- · 2019-01-10 07:07

I suggest using the excellent ASIHTTPRequest source from All-Seeing Interactive: http://allseeing-i.com/ASIHTTPRequest. I'm doing this, and so are several released iPhone apps, so you can be sure the code is pretty solid.

This is a wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier. It is written in Objective-C and works in both Mac OS X and iPhone applications.

It is suitable for performing basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE). The ASIFormDataRequest subclass makes it easy to submit POST data and files using multipart/form-data.

查看更多
We Are One
5楼-- · 2019-01-10 07:09

[akosma / iphonerestwrappert] try this wrapper from github

Caged / httpriot this is a very Simple HTTP Rest Library for iPhone and Cocoa projects.

查看更多
We Are One
6楼-- · 2019-01-10 07:13

In case your REST service is implemented in Ruby on Rails, the open source ObjectiveResource project is looking very promising. It has been working great for me in a relatively complex project of mine, and I've even contributed some code back to them.

ObjectiveResource

查看更多
Root(大扎)
7楼-- · 2019-01-10 07:16

I created a blog article about doing this.

http://www.dreamfreeze.net/weblog/restful_webservices.html

查看更多
登录 后发表回答