【发布时间】:2016-10-18 02:27:40
【问题描述】:
我想使用 Alamofire 通过 Mailgun 发送电子邮件。我正在使用下面的代码发送请求,但我在以.response 开头的线上收到错误Cannot call value of non-function type 'HTTPURLResponse?'。
我该如何解决这个问题?我正在尝试复制此处找到的代码,但为 Swift 3 更新它。我正在尝试使用 Mailgun 和 Alamofire 发送电子邮件。
https://gist.github.com/makzan/11e8605f85352abf8dc1/
谢谢!
Alamofire.request(url, method: .post, parameters: parameters)
.authenticate(user: "api", password: key)
.response{ (request, response, data, error) in
println(request)
println(response)
println(error)
}
}
【问题讨论】: