我有一个问题,我尝试使用Alamofire的PATCH方法更新,但没有更改反映出来。PATCH与Alamofire(swift 2.3)
我想在其中一个我犯了一些错误。
这是我的代码:
Alamofire.request(.PATCH, url, parameters: ["op": "replace", "path": "/IsVacinated", "value": true], encoding: .JSON)
.responseJSON { response in
Utils.endRequest(progressView)
if let data = response.data {
let json = JSON(data: data)
if json != nil {
self.navigationController?.popViewControllerAnimated(true)
print(json)
}
else {
print("nil json")
}
}
else {
print("nil data")
}
}
我希望你能帮助我,我已经搜索并没有太多的信息。
此致敬礼。
太好了!非常感谢你 – Luckio