Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating README

  • Loading branch information...
commit 6136d59b15f9d3d3d576a15500470490ab1b5235 1 parent 1715163
@mattt mattt authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 README.md
View
11 README.md
@@ -3,10 +3,10 @@
AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of [NSURLConnection](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html), [NSOperation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html), and other familiar Foundation technologies. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. For example, here's how easy it is to get JSON from a URL:
``` objective-c
-NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"];
+NSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
- NSLog(@"Public Timeline: %@", JSON);
+ NSLog(@"App.net Global Stream: %@", JSON);
} failure:nil];
[operation start];
```
@@ -106,10 +106,9 @@ UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0
### API Client Request
``` objective-c
-// AFGowallaAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates
-[[AFGowallaAPIClient sharedClient] getPath:@"/spots/9223" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
- NSLog(@"Name: %@", [responseObject valueForKeyPath:@"name"]);
- NSLog(@"Address: %@", [responseObject valueForKeyPath:@"address.street_address"]);
+// AFAppDotNetAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates
+[[AFAppDotNetAPIClient sharedClient] getPath:@"stream/0/posts/stream/global" parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) {
+ NSLog(@"App.net Global Stream: %@", JSON);
} failure:nil];
```
Please sign in to comment.
Something went wrong with that request. Please try again.