1
我使用Alamofire發出了一些HTTP請求。有些請求已成功,有些請求失敗。Alamofire HTTP請求失敗
誤差爲Invalid value around character 0.
請求失敗給了我上面的錯誤。
波紋管我提到了一個失敗的示例代碼。
let parameters = ["amount": ["10"], "payment_method": ["paypal"], "date": ["2015-11-25"], "details": ["Payment description"]]
let headers = [
"Accept": "*/*",
"Content-Type": "application/json"
]
let url = "https://livetest.somedomain.com/api/invs/LAT1j5da99PdPg/payments?auth_token=pbtTEPNki3hUhGBuPX3d"
Alamofire.request(.POST, url, parameters: parameters, encoding: .JSON, headers: headers)
.responseJSON { response in
let results = response.result
print(results)
print(response.debugDescription)
}
請幫我找到問題