forked from Shopify/ObjectiveRecord
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathActiveRequest.m
More file actions
68 lines (49 loc) · 1.33 KB
/
ActiveRequest.m
File metadata and controls
68 lines (49 loc) · 1.33 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// ActiveRequest.m
// Shopify_Mobile
//
// Created by Matthew Newberry on 8/2/10.
// Copyright 2010 Shopify. All rights reserved.
//
#import "ActiveRequest.h"
@implementation ActiveRequest
@synthesize didParseObjectSelector = _didParseObjectSelector;
@synthesize totalBatches = _totalBatches;
@synthesize batch = _batch;
@synthesize user = _user;
@synthesize password = _password;
@synthesize delegate = _delegate;
@synthesize didFinishSelector = _didFinishSelector;
@synthesize didFailSelector = _didFailSelector;
@synthesize urlPath = _urlPath;
@synthesize httpMethod = _httpMethod;
@synthesize httpBody = _httpBody;
@synthesize parameters = _parameters;
@synthesize headers = _headers;
@synthesize contentType = _contentType;
- (id) initWithURLPath:(NSString *) url{
if((self = [super init])){
self.urlPath = url;
_parameters = [[NSMutableDictionary alloc] init];
}
return self;
}
+ (ActiveRequest *) requestWithURLPath:(NSString *) url{
return [[[ActiveRequest alloc] initWithURLPath:url] autorelease];
}
- (void) addParameters:(NSDictionary *) params{
[_parameters addEntriesFromDictionary:params];
}
- (void)dealloc
{
[_urlPath release];
[_httpMethod release];
[_httpBody release];
[_parameters release];
[_headers release];
[_contentType release];
[_user release];
[_password release];
[super dealloc];
}
@end