views:

193

answers:

2

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.

+1  A: 

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

Good framework!

adam
A: 

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