Here's the code:
extension Alamofire.Request {
public func responseObject<T: ResponseJSONObjectSerializable> (completionHandler: (NSURLRequest?, NSHTTPURLResponse?, Result<T> -> Void) -> Self {
//Error1: expected ',' separator
//Error2: expected parameter type following ':'
...
)
}
I'm using Swift 2.0, Alamofire 3.0, and SwiftyJSON.
See Question&Answers more detail:os