Moving AFHTTPClientOperation protocol to AFHTTPClient
Refactoring #import statements
This commit is contained in:
parent
b7564e9f5a
commit
b28b99dd16
2 changed files with 13 additions and 9 deletions
|
|
@ -21,8 +21,9 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AFHTTPRequestOperation.h"
|
||||
|
||||
@class AFHTTPRequestOperation;
|
||||
@protocol AFHTTPClientOperation;
|
||||
@protocol AFMultipartFormData;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -288,6 +289,16 @@ typedef enum {
|
|||
|
||||
#pragma mark -
|
||||
|
||||
@protocol AFHTTPClientOperation <NSObject>
|
||||
+ (BOOL)canProcessRequest:(NSURLRequest *)request;
|
||||
+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request;
|
||||
+ (id)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest
|
||||
success:(void (^)(id object))success
|
||||
failure:(void (^)(NSHTTPURLResponse *response, NSError *error))failure;
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock:`.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,14 +22,7 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AFURLConnectionOperation.h"
|
||||
|
||||
@protocol AFHTTPClientOperation <NSObject>
|
||||
+ (BOOL)canProcessRequest:(NSURLRequest *)request;
|
||||
+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request;
|
||||
+ (id)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest
|
||||
success:(void (^)(id object))success
|
||||
failure:(void (^)(NSHTTPURLResponse *response, NSError *error))failure;
|
||||
@end
|
||||
#import "AFHTTPClient.h"
|
||||
|
||||
/**
|
||||
`AFHTTPRequestOperation` is an `NSOperation` subclass that implements the `NSURLConnection` delegate methods, and provides a simple block-based interface to asynchronously get the result and context of that operation finishes.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue