Merge pull request #2613 from tomekc/swift-validate-response

[swift] Check server response and fail request in case of non-2xx response
This commit is contained in:
wing328
2016-04-16 16:36:25 +08:00
@@ -75,7 +75,7 @@ class AlamofireRequestBuilder<T>: RequestBuilder<T> {
request.authenticate(usingCredential: credential)
}
request.responseJSON(options: .AllowFragments) { response in
request.validate().responseJSON(options: .AllowFragments) { response in
managerStore.removeValueForKey(managerId)
if response.result.isFailure {