Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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