0
我正在使用alamofire請求的這個函數。請告訴我我做錯了什麼?與打印您的請求主體如何使用alamofire post參數和回調函數swift 3?
Alamofire.request(url, method: .post, parameters: parameter).validate().responseJSON { response in
switch response.result {
case .success:
if let result = response.result.value {
print("Validation Successful")
dic=(response.result.value) as! NSDictionary
var error = NSInteger()
error=dic.object(forKey: "error") as! NSInteger
completion(dic,error)
}
case .failure(let error):
print(error)
completion(dic,0)
}
}
你的問題是什麼?你能告訴我們嗎? –
我沒有得到迴應 – Pritam
您因失敗而失敗? –