Alamofire-RACExtensions icon indicating copy to clipboard operation
Alamofire-RACExtensions copied to clipboard

Error: Missing argument for parameter 'completionHandler' in call

Open maurim86 opened this issue 10 years ago • 0 comments

Hi, I'm rather new to github and don't really know how the forking and pull requests work so I decided to make an issue about this.

I'm using Xcode version 6.4

I tried the RACExtensions and I ran into 2 errors: in RACAlamofire.swift

line 78: self.responseString({ (request, response, string, error) -> Void in
line 105: self.responseJSON({ (request, response, JSON, error) -> Void in

which can be fixed by changing the calls as follows:

self.responseString(encoding: NSUTF8StringEncoding, completionHandler:  { (request, response, string, error) -> Void in
self.responseJSON(options: NSJSONReadingOptions.AllowFragments, completionHandler: { (request, response, JSON, error) -> Void in

Not sure which reading options to use for JSON tho.

I hope this helps

maurim86 avatar Jul 24 '15 08:07 maurim86