现在我已经升级到Alamofire 2,我注意到即使返回非200或4xx的http响应,回调函数也认为响应是成功的。
这是预期的行为吗?如何检查错误响应 - 只需手动检查response.statusCode吗?
Alamofire.request(.GET, "http://somesite.org/private")
.responseJSON { _, _, result in
print(result.isSuccess) // is true even if it's a 403 or 404 response
}