我需要提出一些HTML請求,並且我決定使用Alamofire。Alamofire HTML請求僅適用於每次安裝應用程序
我第一次在下面提出請求,它工作正常,返回訪問密鑰。然後,如果我嘗試再次撥打任何電話(登錄,註銷,註冊等任何呼叫),它不起作用,它會失敗,並給我錯誤。
如果我刪除應用程序並重新安裝它,它會再次正常工作,比我可以再次發出1個請求,直到它開始給我錯誤。
這裏的登錄請求:
let parameters : [ String : String] = [
"email": email,
"password":password
]
Alamofire.request(.POST, url, parameters: parameters).validate()
.responseJSON { response in
switch response.result {
case .Success:
if let json = response.result.value {
print("JSON: \(json)")
}
case .Failure(let error):
print(error)
}
}
這裏是出現在每一它適用於每一個安裝一次又一次的錯誤:
錯誤域= com.alamofire.error代碼= -6003 「響應狀態代碼爲>不可接受:403」 的UserInfo = {NSLocalizedFailureReason =響應狀態>碼是不能接受的:403}
任何幫助表示讚賞,謝謝。還提供
可悲的是得到解決,不行,同樣的錯誤繼續 –
您好,嘗試我的答案。 –