Skip to content

Instantly share code, notes, and snippets.

@Dimillian
Created February 29, 2012 09:34
Show Gist options
  • Save Dimillian/1939449 to your computer and use it in GitHub Desktop.
Save Dimillian/1939449 to your computer and use it in GitHub Desktop.
RestRequst
#import <Foundation/Foundation.h>
#import "MSJSonError.h"
@protocol MSRESTRequestDelegate;
@interface MSRESTRequest : NSObject
{
id<MSRESTRequestDelegate>__unsafe_unretained delegetae;
}
@property (nonatomic, unsafe_unretained) id<MSRESTRequestDelegate> delegate;
-(id)initWithMethod:(NSString *)method parameters:(NSArray *)array shouldEscapeParameters:(BOOL)escape;
-(void)executeRequest;
-(void)cancelRequest;
@end
@protocol MSRESTRequestDelegate
@required
-(void)requestDidStart;
-(void)requestDidFinishWithSuccess;
-(void)requestDidFailWithError:(MSJSonError *)error;
-(void)requestDidFailBecauseNoActiveConnection;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment