-1
額外的參數「方法」被抓我的頭,也能收到額外的參數「方法」在通話,全部是我把數據是正確的Kepp讓呼叫
ratingStar
是雙數據類型
// Global Variable
reviewDriverEndPoint = "www.mywebsite.com/api/review"
func reviewDriver() {
let parameters: [String: AnyObject] = [
"star": ratingStar as AnyObject,
"comment": reviewBox.text as AnyObject,
]
Alamofire.request(reviewDriverEndPoint, method: .post, parameters: parameters, encoding: JSONEncoding.default)
.responseJSON { response in
if let value = response.result.value {
print(value)
}
}
}
這有什麼問題呢? –
我無法重現您的錯誤。 –