Created
February 29, 2012 10:40
-
-
Save Dimillian/1939822 to your computer and use it in GitHub Desktop.
MSRESTRequest
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
@protocol MSRESTRequestDelegate; | |
@interface MSRESTRequest : NSObject <NSURLConnectionDelegate, RPLoginViewControllerDelegate> | |
{ | |
id<MSRESTRequestDelegate>__unsafe_unretained delegate; | |
BOOL _sucessResponse; | |
BOOL _isProcessing; | |
BOOL _autoLoginAttempt; | |
NSString *_method; | |
NSString *_ressource; | |
NSArray *_parameters; | |
NSMutableData *_responseData; | |
NSURLConnection *_connection; | |
} | |
@property (nonatomic, unsafe_unretained) id<MSRESTRequestDelegate> delegate; | |
-(id)initWithMethod:(NSString *)method | |
ressource:(NSString *)ressource | |
parameters:(NSArray *)array | |
shouldEscapeParameters:(BOOL)escape; | |
-(void)constructRequest; | |
-(NSString *)constructParametersString; | |
-(void)executeRequest; | |
-(void)cancelRequest; | |
-(void)reset; | |
@end | |
@protocol MSRESTRequestDelegate | |
@required | |
-(void)requestDidStart; | |
-(void)requestDidFinishWithSuccess:(NSDictionary *)response; | |
-(void)requestDidFailWithError:(MSJSonError *)error; | |
-(void)reQuestDidFailBecauseNotLogged; | |
-(void)requestDidFailBecauseNoActiveConnection; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment