【发布时间】:2016-07-25 11:04:23
【问题描述】:
我现在正在寻找在 Alamofire Content-Type application/json 中为 PUT 方法添加 content-type: application/json 的解决方案。我已经开发如下,但无法正常工作。
Alamofire.request(.PUT, Config.preferenceURL, parameters: param, headers: headers)
.validate(contentType: ["application/json"])
.responseJSON { response in
let swiftyJsonVar = JSON(response.result.value!)
print(swiftyJsonVar)
if (swiftyJsonVar["success"]) {
}
JHProgressHUD.sharedHUD.hide()
}
【问题讨论】:
-
显示/添加你得到的错误日志。