我有一个问题,我尝试使用Alamofire使用PATCH方法进行更新,但没有反映出任何更改。
我想我在其中做了一些错误。
这是我的代码:
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")
}
}
希望你能帮助我,我已经搜索过了,但信息不是很丰富。
最好的问候。