forked from whilethis/Super-Checkout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperCheckoutHTTPURLConnection.h
executable file
·41 lines (31 loc) · 1.27 KB
/
SuperCheckoutHTTPURLConnection.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
//
// SuperCheckoutHTTPURLConnection.h
// Super Checkout
//
// Created by Brandon Alexander on 1/26/11.
// Copyright 2011 While This, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SuperCheckoutRequestTypes.h"
@interface SuperCheckoutHTTPURLConnection : NSURLConnection {
NSMutableData *data; // accumulated data received on this connection
SuperCheckoutRequestType requestType; // general type of this request, mostly for error handling
SuperCheckoutResponseType responseType; // type of response data expected (if successful)
NSString *identifier;
NSURL *URL; // the URL used for the connection (needed as a base URL when parsing with libxml)
NSHTTPURLResponse *response; // the response.
}
- (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate
requestType:(SuperCheckoutRequestType)requestType responseType:(SuperCheckoutResponseType)responseType;
// Data helper methods
- (void)resetDataLength;
- (void)appendData:(NSData *)data;
// Accessors
- (NSString *)identifier;
- (NSData *)data;
- (NSURL *)URL;
- (SuperCheckoutRequestType)requestType;
- (SuperCheckoutResponseType)responseType;
- (NSString *)description;
@property (nonatomic, retain) NSHTTPURLResponse *response;
@end