Method signature for responseObjectequals
public func responseObject<T: Mappable>(completionHandler: (T?, ErrorType?) -> Void) -> Self
note that the error parameter is - ErrorType?and not NSError?. The correct way to call a closure is:
Alamofire.request(.GET, url).responseObject{(response: WeatherResponse?, error: ErrorType?) -> Void in
print(response?.location)
}
Alamofire, AlamofireObjectMapper ObjectMapper.