Skip to content

Instantly share code, notes, and snippets.

@seivan
Created February 1, 2014 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seivan/8751548 to your computer and use it in GitHub Desktop.
Save seivan/8751548 to your computer and use it in GitHub Desktop.
if(self.accessCredential.isAboutToExpire) [self refreshToken];
dispatch_group_notify(self.signalWaitingForRefresh, dispatch_get_main_queue(), ^{
[self.apiClient requestWithResourcePath:theResourcePath parameters:theParameters HTTPMethod:theHTTPMethod onComplete:^(NSDictionary *responseObject, NSError *error, NSHTTPURLResponse *HTTPURLResponse) {
theBlock(responseObject,error, HTTPURLResponse);
}];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment