-
Notifications
You must be signed in to change notification settings - Fork 0
/
HttpOperation.h
52 lines (32 loc) · 1.28 KB
/
HttpOperation.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// HttpOperation.h
//
// Licensed by ruralcoder.com under the
// Creative Commons Attribution-ShareAlike 3.0 Unported License
#import <Foundation/Foundation.h>
#import "HttpOperationDelegate.h"
typedef enum
{
HttpOperationGet,
HttpOperationPost
} HttpOperations;
@interface HttpOperation : NSOperation <NSURLConnectionDataDelegate>
@property (nonatomic, assign) BOOL executing;
@property (nonatomic, assign) BOOL finished;
@property (nonatomic, readonly) id delegate;
@property (nonatomic, readonly) id cookie;
@property (nonatomic, readonly) id resourceUrl;
@property (nonatomic, readonly) NSData *responseData;
@property (nonatomic, readonly) NSURLRequest *request;
@property (nonatomic, readonly) HttpOperations type;
- (id) initWithRequest:(NSURLRequest*)httpRequest
type:(HttpOperations)httpType
cookie:(id)object
target:(id<HttpOperationDelegate>)target;
+ (void) startHttpGetOperationWithClient:(id)client
resource:(NSString*)resource
withPayload:(NSDictionary*)args ;
+ (void) startHttpPostOperationWithClient:(id)client
resource:(NSString*)resource
withPayload:(NSDictionary*)args ;
@end