-
Notifications
You must be signed in to change notification settings - Fork 1
/
CCHTTPRequest.h
48 lines (35 loc) · 950 Bytes
/
CCHTTPRequest.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
48
//
// UVAPIRequest.h
// PostForm
//
// Created by karloz on 4/13/11.
// Copyright 2011 cod3monkey. All rights reserved.
//
/**
* History
*
* 16/apr/11
* 0.0.2 + Multiple request handling
*
* 15/apr/11
* 0.0.1 Initial Release
*
*/
#import <Foundation/Foundation.h>
@protocol CCHTTPRequestDelegate <NSObject>
@optional
- (void)request:(NSURLRequest *)request didFinishWithResponseString:(NSString *)response;
- (void)request:(NSURLRequest *)request didFailWithError:(NSError *)error;
@end
@interface CCHTTPRequest : NSObject {
@private
NSURL *originalURL;
NSMutableURLRequest *urlRequest;
NSURLConnection *urlConnection;
CFMutableDictionaryRef responseDataDict;
id <CCHTTPRequestDelegate> delegate;
}
- (void)performGetRequestWithURL:(NSURL *)url parameters:(id)parameters;
- (void)performPostRequestWithURL:(NSURL *)url parameters:(id)parameters;
@property (nonatomic, assign) id <CCHTTPRequestDelegate> delegate;
@end