-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMAHTTPRequest.h
More file actions
54 lines (43 loc) · 1.05 KB
/
MAHTTPRequest.h
File metadata and controls
54 lines (43 loc) · 1.05 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
//
// MAHTTPRequest.h
// MAAsyncIO
//
// Created by Raphael Bartolome on 14.04.11.
// Copyright 2011 Raphael Bartolome. All rights reserved.
//
#import <Foundation/Foundation.h>
enum kMAHTTPMethod {
kMAHTTPGetMethod,
kMAHTTPPostMethod,
kMAHTTPPutMethod,
kMAHTTPHeadMethod,
kMAHTTPDeleteMethod,
kMAHTTPTraceMethod,
kMAHTTPOptionsMethod,
kMAHTTPConnectMethod,
kMAHTTPPathMethod,
kMAHTTPNotDefined,
};
typedef NSUInteger MAHTTPMethod;
@interface MAHTTPRequest : NSObject {
@private
NSString *_resource;
NSString *_method;
NSInteger _headerLength;
NSMutableDictionary *_header;
NSMutableDictionary *_formValues;
NSData *_content;
}
- (id)initWithHeader: (NSData *)header;
- (NSDictionary *)header;
- (NSInteger)headerLength;
- (NSString *)methodString;
- (MAHTTPMethod)method;
- (NSString *)resource;
- (NSString *)resourceExtension;
- (NSInteger)expectedContentLength;
- (id)formValueForKey: (NSString *)key;
- (NSDictionary *)formValues;
- (void)setContent: (NSData *)data;
- (NSData *)content;
@end