浏览代码

Add responseCollection example to README

Josh Brown 10 年之前
父节点
当前提交
fd2eeb7f23
共有 1 个文件被更改,包括 7 次插入0 次删除
  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: