0

Having some issues with Alamofire migrating to swift 3. I had this code before working now I'm getting an error. See code below:

        let URL = Foundation.URL(string: Router.baseURLString)
        let URLRequest = NSMutableURLRequest(url: URL!.appendingPathComponent(path))
        let encoding = Alamofire.ParameterEncoding.URL
        return encoding.encode(URLRequest, parameters: parameters).0

Getting the error on the 'let encoding =' line.

Error:

Type 'ParameterEncoding' has no member 'URL'

Slygoth
  • 333
  • 6
  • 17
  • There is lot change with Swift3, you may wanna check this : https://stackoverflow.com/questions/42524820/alamofire-type-parameterencoding-has-no-member-url-swift-3 – Joe Aug 02 '17 at 01:33

1 Answers1

0

Try this

Alamofire.ParameterEncoding.encode(URLRequest, parameters: parameters).0
Kiester
  • 147
  • 1
  • 7