How to get and save the response in swift5 and Alamofire 5 beta version?
For Alamo 5 you have to use:
response.value
Try the following code, please:
switch response.result {
case .success(let value):
if let JSON = value as? [String: Any] {
let status = JSON["status"] as! String
print(status)
}
case .failure(let error): break
// error handling
}