You know what's an even _better name? AFHTTPClient. Boom.
This commit is contained in:
parent
cad7d40642
commit
ebb6eb21ad
4 changed files with 14 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
// AFRESTClient.h
|
// AFHTTPClient.h
|
||||||
//
|
//
|
||||||
// Copyright (c) 2011 Gowalla (http://gowalla.com/)
|
// Copyright (c) 2011 Gowalla (http://gowalla.com/)
|
||||||
//
|
//
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
@protocol AFMultipartFormDataProxy;
|
@protocol AFMultipartFormDataProxy;
|
||||||
|
|
||||||
@interface AFRESTClient : NSObject {
|
@interface AFHTTPClient : NSObject {
|
||||||
@private
|
@private
|
||||||
NSURL *_baseURL;
|
NSURL *_baseURL;
|
||||||
NSStringEncoding _stringEncoding;
|
NSStringEncoding _stringEncoding;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// AFRESTClient.m
|
// AFHTTPClient.m
|
||||||
//
|
//
|
||||||
// Copyright (c) 2011 Gowalla (http://gowalla.com/)
|
// Copyright (c) 2011 Gowalla (http://gowalla.com/)
|
||||||
//
|
//
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#import "AFRESTClient.h"
|
#import "AFHTTPClient.h"
|
||||||
#import "AFJSONRequestOperation.h"
|
#import "AFJSONRequestOperation.h"
|
||||||
|
|
||||||
static NSString * const kAFMultipartFormLineDelimiter = @"\r\n"; // CRLF
|
static NSString * const kAFMultipartFormLineDelimiter = @"\r\n"; // CRLF
|
||||||
|
|
@ -83,13 +83,13 @@ static NSString * AFURLEncodedStringFromStringWithEncoding(NSString *string, NSS
|
||||||
return [(NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, (CFStringRef)kAFLegalCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)) autorelease];
|
return [(NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, (CFStringRef)kAFLegalCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)) autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
@interface AFRESTClient ()
|
@interface AFHTTPClient ()
|
||||||
@property (readwrite, nonatomic, retain) NSURL *baseURL;
|
@property (readwrite, nonatomic, retain) NSURL *baseURL;
|
||||||
@property (readwrite, nonatomic, retain) NSMutableDictionary *defaultHeaders;
|
@property (readwrite, nonatomic, retain) NSMutableDictionary *defaultHeaders;
|
||||||
@property (readwrite, nonatomic, retain) NSOperationQueue *operationQueue;
|
@property (readwrite, nonatomic, retain) NSOperationQueue *operationQueue;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation AFRESTClient
|
@implementation AFHTTPClient
|
||||||
@synthesize baseURL = _baseURL;
|
@synthesize baseURL = _baseURL;
|
||||||
@synthesize stringEncoding = _stringEncoding;
|
@synthesize stringEncoding = _stringEncoding;
|
||||||
@synthesize defaultHeaders = _defaultHeaders;
|
@synthesize defaultHeaders = _defaultHeaders;
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
F8E469671395739D00DB05C8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469661395739D00DB05C8 /* Foundation.framework */; };
|
F8E469671395739D00DB05C8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469661395739D00DB05C8 /* Foundation.framework */; };
|
||||||
F8E469691395739D00DB05C8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469681395739D00DB05C8 /* CoreGraphics.framework */; };
|
F8E469691395739D00DB05C8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469681395739D00DB05C8 /* CoreGraphics.framework */; };
|
||||||
F8E469DF13957DD500DB05C8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469DE13957DD500DB05C8 /* CoreLocation.framework */; };
|
F8E469DF13957DD500DB05C8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E469DE13957DD500DB05C8 /* CoreLocation.framework */; };
|
||||||
F8FBFA98142AA239001409DB /* AFRESTClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FBFA97142AA238001409DB /* AFRESTClient.m */; };
|
F8FBFA98142AA239001409DB /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FBFA97142AA238001409DB /* AFHTTPClient.m */; };
|
||||||
FF2B770D140DAC4E00A8DEC2 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2B770C140DAC4E00A8DEC2 /* libz.dylib */; };
|
FF2B770D140DAC4E00A8DEC2 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2B770C140DAC4E00A8DEC2 /* libz.dylib */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
|
@ -71,8 +71,8 @@
|
||||||
F8E469E013957DF100DB05C8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
F8E469E013957DF100DB05C8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||||
F8E469E213957DF700DB05C8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
F8E469E213957DF700DB05C8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||||
F8E469E413957E0400DB05C8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
F8E469E413957E0400DB05C8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||||
F8FBFA96142AA237001409DB /* AFRESTClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFRESTClient.h; path = ../AFNetworking/AFRESTClient.h; sourceTree = "<group>"; };
|
F8FBFA96142AA237001409DB /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; name = AFHTTPClient.h; path = ../AFNetworking/AFHTTPClient.h; sourceTree = "<group>"; };
|
||||||
F8FBFA97142AA238001409DB /* AFRESTClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFRESTClient.m; path = ../AFNetworking/AFRESTClient.m; sourceTree = "<group>"; };
|
F8FBFA97142AA238001409DB /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPClient.m; path = ../AFNetworking/AFHTTPClient.m; sourceTree = "<group>"; };
|
||||||
FF2B770C140DAC4E00A8DEC2 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
FF2B770C140DAC4E00A8DEC2 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
|
@ -227,8 +227,8 @@
|
||||||
F874B5C913E0AA6500B28E3E /* AFHTTPRequestOperation.m */,
|
F874B5C913E0AA6500B28E3E /* AFHTTPRequestOperation.m */,
|
||||||
F874B5D413E0AA6500B28E3E /* AFJSONRequestOperation.h */,
|
F874B5D413E0AA6500B28E3E /* AFJSONRequestOperation.h */,
|
||||||
F874B5CC13E0AA6500B28E3E /* AFJSONRequestOperation.m */,
|
F874B5CC13E0AA6500B28E3E /* AFJSONRequestOperation.m */,
|
||||||
F8FBFA96142AA237001409DB /* AFRESTClient.h */,
|
F8FBFA96142AA237001409DB /* AFHTTPClient.h */,
|
||||||
F8FBFA97142AA238001409DB /* AFRESTClient.m */,
|
F8FBFA97142AA238001409DB /* AFHTTPClient.m */,
|
||||||
F874B5D313E0AA6500B28E3E /* AFImageRequestOperation.h */,
|
F874B5D313E0AA6500B28E3E /* AFImageRequestOperation.h */,
|
||||||
F874B5CB13E0AA6500B28E3E /* AFImageRequestOperation.m */,
|
F874B5CB13E0AA6500B28E3E /* AFImageRequestOperation.m */,
|
||||||
F874B5D213E0AA6500B28E3E /* AFImageCache.h */,
|
F874B5D213E0AA6500B28E3E /* AFImageCache.h */,
|
||||||
|
|
@ -336,7 +336,7 @@
|
||||||
F874B5DC13E0AA6500B28E3E /* AFJSONRequestOperation.m in Sources */,
|
F874B5DC13E0AA6500B28E3E /* AFJSONRequestOperation.m in Sources */,
|
||||||
F874B5DD13E0AA6500B28E3E /* AFNetworkActivityIndicatorManager.m in Sources */,
|
F874B5DD13E0AA6500B28E3E /* AFNetworkActivityIndicatorManager.m in Sources */,
|
||||||
F874B5E013E0AA6500B28E3E /* UIImageView+AFNetworking.m in Sources */,
|
F874B5E013E0AA6500B28E3E /* UIImageView+AFNetworking.m in Sources */,
|
||||||
F8FBFA98142AA239001409DB /* AFRESTClient.m in Sources */,
|
F8FBFA98142AA239001409DB /* AFHTTPClient.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import "AFRESTClient.h"
|
#import "AFHTTPClient.h"
|
||||||
|
|
||||||
extern NSString * const kAFGowallaClientID;
|
extern NSString * const kAFGowallaClientID;
|
||||||
extern NSString * const kAFGowallaBaseURLString;
|
extern NSString * const kAFGowallaBaseURLString;
|
||||||
|
|
||||||
@interface AFGowallaAPIClient : AFRESTClient
|
@interface AFGowallaAPIClient : AFHTTPClient
|
||||||
+ (AFGowallaAPIClient *)sharedClient;
|
+ (AFGowallaAPIClient *)sharedClient;
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue