尝试转换Swift 3.0的代码库当前使用
return (Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: nil).0, uploadData)
地点:
let mutableURLRequest = NSMutableURLRequest(url: URL(string: urlString)!)
有错误"ParameterEncoding has no member URL"
。也试过
return (Alamofire.ParameterEncoding.encode(mutableURLRequest).0, uploadData) and the doesn't work. Any ideas how to fix this? Any pointers would be really appreciated! Thanks!
Alamofire有一个URLEncoding结构体,它确认了ParameterEncoding协议。
var urlRequest:URLRequest? = nil
do {
try urlRequest = Alamofire.URLEncoding().encode(mutableURLRequest, with: parameters)
} catch {
}
return urlRequest!