I Pass the string also one param along with array at API hitting time using Alamofire.
But response time my string read as a nill please anyone suggest to me.
These are my parameters
let apiurl = "https://www.furnitureinfashion.net/FIF-APP/app_array_cart.php?"
let params:[String:Any] = ["customer_id":"152698",
"product_id":["27372","31872"],
"qty":["3","4"],
"option":["1202",""]]
find my API hitting code as following
Alamofire.request(apiurl, method:.get, parameters: params, encoding: JSONEncoding.default).responseJSON { (response) in
if response.result.value != nil{
print(response)
}else{
print(response.result.error?.localizedDescription ?? "")
}
}
I get a response like this:
SUCCESS: {
Message = "Customer id missing";
cusid = "<null>";
status = "Not ok";
}
cusidorcustomer_id?