我想用Alamofire发布这个原始的尸体,我该怎么办?
[
{
"x": 234,
"y": 1,
"z": 10648
}
]
答案 0 :(得分:-1)
请尝试以下操作:
let param = ["x": "234", "y": "1", "z": "10648"]
Alamofire.request(requestURL, method: .post, parameters: param as? Parameters, encoding: JSONEncoding.default, headers: nil).responseJSON { (responseJson) in
print("Response : \(responseJson)")
if (responseJson.result.isSuccess){
//Sucess Part
} else {
//Fail part
}
}