Created
August 3, 2010 18:25
-
-
Save lukeredpath/506869 to your computer and use it in GitHub Desktop.
Working on my Ruby restclient-inspired Objective-C REST library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // delegate-based API | |
| [[LRResty client] get:@"http://example.com/testing" delegate:self]; // calls @selector(restClient:receivedResponse:) | |
| // block-based API | |
| [[LRResty client] get:@"http://example.com/testing" withBlock:^(LRRestyResponse *response) { | |
| NSLog(@"Received response with status %d, body: %@", response.status, [response asString]); | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment