Check out example codes for "alamofire failure response body". It will help you in understanding the concepts better.
Code Example 1
if let data = response.data {
let json = String(data: data, encoding: .utf8)
print("Failure Response: \(json)")
}
Learn ReactJs, React Native from akashmittal.com