The last parameter of sendAsynchronousRequest
is a completion handler with type (NSURLResponse!, NSData!, NSError!) -> Void
. Note it doesn't have any return type, so don't return anything.
The completion handler is called by the connection framework, it doesn't need any return type.
It's pretty obscure what you are trying to achieve by that returns but you can't do it this way.