I want to post this raw body with Alamofire, how I can do it?
[
{
"x": 234,
"y": 1,
"z": 10648
}
]
I want to post this raw body with Alamofire, how I can do it?
[
{
"x": 234,
"y": 1,
"z": 10648
}
]
Please try this:
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
}
}