3

So I'm brand new to rest's API and have never used an API ever before. I'm ok with Objective-C and Cocoa Touch but just have no clue where to start when accessing the API and how to in general. Can someone help me get started with some code that will access titles in rest or just how to access a REST API in general with authentication. Thanks.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
iOS_User
  • 1,372
  • 5
  • 21
  • 35
  • 1
    This appears to be a duplicate of this question: http://stackoverflow.com/questions/630306/iphone-rest-client and possibly this one: http://stackoverflow.com/questions/1557040/objective-c-best-way-to-access-rest-api-on-your-iphone – Brad Larson Apr 23 '10 at 17:16

3 Answers3

1

Try http://allseeing-i.com/ASIHTTPRequest/

Good framework!

adam
  • 22,404
  • 20
  • 87
  • 119
1

Take a look at RestKit: http://restkit.org/

It features a high level object mapping framework that can turn remote RESTful responses back into local objects declaratively, handling all the parsing and mapping for you.

Blake Watters
  • 6,607
  • 1
  • 43
  • 33
0

http://github.com/mirek/NSMutableDictionary-REST.framework is easy to use.

To get REST as dictionary from GitHub API as an example:

NSString *url = @"http://github.com/api/v2/xml/user/search/mirek";
[NSMutableDictionary dictionaryWithRESTContentsOfURL: url];

To post:

[myDict postRESTWithURL: @"http://localhost:3000/my-rest"];

It supports sync/async, intuitive array conversions, url encoded and multipart posts (you can send images and other files).

Mirek Rusin
  • 18,820
  • 3
  • 43
  • 36