-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsyncRequest.h
More file actions
30 lines (22 loc) · 738 Bytes
/
AsyncRequest.h
File metadata and controls
30 lines (22 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// AsyncRequest.h
// readinglist
//
// Created by Akshay Jawharker on 3/15/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^CompletionBlock)(void);
typedef void(^FailedBlock)(void);
@interface AsyncRequest : NSObject
-(void) requestWithURL:(NSString*) urlString;
-(void) startAsync;
-(void) cancelAsync;
-(void) setOnCompleteBlock:(CompletionBlock)completeBlock;
-(void) setOnFailureBlock:(FailedBlock)failedBlock;
@property(nonatomic, retain) NSMutableData* responseData;
@property(nonatomic, copy) NSURL* requestURL;
@property(nonatomic, copy) CompletionBlock completionBlock;
@property(nonatomic, copy) FailedBlock failureBlock;
@end
NSURLConnection* connection;