I am using AFNetworking in a Swift project.

1 - Typealias the closure:

```
typealias successBlock = (AFHTTPRequestOperation! ,AnyObject!)-> Void
typealias failureBlock = (AFHTTPRequestOperation, NSError!) -> Void

```

2 - Define the function:

```
func getUserInfo(success: (successBlock)!, failure: (failureBlock)!) {
   let path = "https://api.wei.s.json"
   let parameters = ["source":"key"]
   self.GET(path, parameters: parameters, success: success, failure: failure)
}

```

3 - Error:

> 
> Cannot invoke 'GET' with an argument list of type '(String,parameters: [String : String], success: (successBlock)!, failure: (failureBlock)!)'
> 
> 
> 

Thanks for any help.

**EIDT:**

```
typealias failureBlock = (AFHTTPRequestOperation, NSError!) -> Void

```

to

```
typealias failureBlock = (AFHTTPRequestOperation!, NSError!) -> Void

```