Created
November 26, 2011 01:59
-
-
Save stuntgoat/1394827 to your computer and use it in GitHub Desktop.
Portion of an example as demonstrated in using NSURLConnection Delegate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyHTTPRequest.h | |
@interface MyHttpRequest : NSObject { | |
// The following 3 class attributes are saved as the initial request is created. | |
// If a redirect occurs, these attributes will be used to copy to the last redirected request, | |
// only if the URL is the same as the initial request's URL | |
NSData *requestBodyData; | |
NSString *requestMethod; // POST or GET | |
NSURL *requestURL; // initial request's URL | |
// other attributes omitted | |
} | |
// notice we 'copy' the NSData. This will be the original request's HTTPBody | |
@property (nonatomic, copy) NSData *requestBodyData; | |
@property (nonatomic, retain) NSString *requestMethod; | |
@property (nonatomic, retain) NSURL *requestURL; | |
// other attributes omitted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment