Created
April 19, 2011 12:59
-
-
Save splhack/927491 to your computer and use it in GitHub Desktop.
This file contains 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
#import <Foundation/Foundation.h> | |
typedef void (^completeBlock_t)(NSData *data); | |
typedef void (^errorBlock_t)(NSError *error); | |
@interface AsyncURLConnection : NSURLConnection | |
{ | |
NSMutableData *data_; | |
completeBlock_t completeBlock_; | |
errorBlock_t errorBlock_; | |
} | |
+ (id)request:(NSString *)requestUrl completeBlock:(completeBlock_t)completeBlock errorBlock:(errorBlock_t)errorBlock; | |
- (id)initWithRequest:(NSString *)requestUrl completeBlock:(completeBlock_t)completeBlock errorBlock:(errorBlock_t)errorBlock; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment