Created
July 18, 2014 20:21
-
-
Save kenn/67730a44a0dc5078defd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Original | |
- (NSURLSessionDataTask *)GET:(NSString *)URLString | |
parameters:(id)parameters | |
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | |
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | |
#pragma mark - Overrides | |
- (NSURLSessionDataTask *)GET:(NSString *)URLString | |
parameters:(id)parameters | |
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | |
fail:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | |
{ | |
return [self GET:URLString parameters:parameters | |
success:^(NSURLSessionDataTask *task, id responseObject) { success(task, responseObject); } | |
failure:^(NSURLSessionDataTask *task, NSError *error) | |
{ | |
[self processCommonError:task withError:error]; | |
failure(task, error); | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment