From b28b99dd16882bea93e6ef357e90f9a9fad2f70c Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 10 Oct 2011 10:51:23 -0500 Subject: [PATCH] Moving AFHTTPClientOperation protocol to AFHTTPClient Refactoring #import statements --- AFNetworking/AFHTTPClient.h | 13 ++++++++++++- AFNetworking/AFHTTPRequestOperation.h | 9 +-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 2e31c27..b0d3c14 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -21,8 +21,9 @@ // THE SOFTWARE. #import -#import "AFHTTPRequestOperation.h" +@class AFHTTPRequestOperation; +@protocol AFHTTPClientOperation; @protocol AFMultipartFormData; typedef enum { @@ -288,6 +289,16 @@ typedef enum { #pragma mark - +@protocol AFHTTPClientOperation ++ (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:`. */ diff --git a/AFNetworking/AFHTTPRequestOperation.h b/AFNetworking/AFHTTPRequestOperation.h index 0ac8678..8e66e54 100644 --- a/AFNetworking/AFHTTPRequestOperation.h +++ b/AFNetworking/AFHTTPRequestOperation.h @@ -22,14 +22,7 @@ #import #import "AFURLConnectionOperation.h" - -@protocol AFHTTPClientOperation -+ (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.