Merge branch 'master' of github.com:AFNetworking/AFNetworking
This commit is contained in:
commit
33c25be23a
@ -123,9 +123,7 @@ static dispatch_group_t http_request_operation_completion_group() {
|
||||
#pragma mark - NSCoding
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder {
|
||||
NSURLRequest *request = [aDecoder decodeObjectForKey:@"request"];
|
||||
|
||||
self = [self initWithRequest:request];
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey;
|
||||
if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
|
||||
if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode]) {
|
||||
NSDictionary *userInfo = @{
|
||||
NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%d), got %d", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], response.statusCode],
|
||||
NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%d)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], response.statusCode],
|
||||
NSURLErrorFailingURLErrorKey:[response URL],
|
||||
AFNetworkingOperationFailingURLResponseErrorKey: response
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user