我已將項目遷移到Swift 3(并在Podfile中將Alamofire更新為最新的Swift 3版本pod 'Alamofire', '~> 4.0')?,F(xiàn)在,我在每個Alamofire.request上都收到“正在調(diào)用的額外參數(shù)”錯誤。例如:let patientIdUrl = baseUrl + nextPatientIdUrlAlamofire.request(.POST, patientIdUrl, parameters: nil, headers: nil, encoding: .JSON)有人可以告訴我為什么嗎?
3 回答
慕勒3428872
TA貢獻1848條經(jīng)驗 獲得超6個贊
使用Swift 3.0和xCode 8.0發(fā)布Alamofire 4.0方法
Alamofire.request(URL, method: .post, parameters: PARAMS)
.responseJSON { closureResponse in
if String(describing: closureResponse.result) == "SUCCESS"
{
// Sucess code
}
else
{
// Failure Code
}
}
- 3 回答
- 0 關(guān)注
- 652 瀏覽
添加回答
舉報
0/150
提交
取消
