Browse Source

Add responseCollection example to README

Josh Brown 10 years ago
parent
commit
fd2eeb7f23
1 changed files with 7 additions and 0 deletions
  1. 7 0
      README.md

+ 7 - 0
README.md

@@ -640,6 +640,13 @@ extension Alamofire.Request {
 }
 ```
 
+```swift
+Alamofire.request(.GET, "http://example.com/users")
+         .responseCollection { (_, _, users: [User]?, _) in
+             println(users)
+         }
+```
+
 ### URLStringConvertible
 
 Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: