Skip to content

Instantly share code, notes, and snippets.

@lukeredpath
Created August 3, 2010 18:25
Show Gist options
  • Select an option

  • Save lukeredpath/506869 to your computer and use it in GitHub Desktop.

Select an option

Save lukeredpath/506869 to your computer and use it in GitHub Desktop.
Working on my Ruby restclient-inspired Objective-C REST library
// 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