Adding +clientWithBaseURL:
Noting that initWithBaseURL: is the designated initializer
This commit is contained in:
parent
2a8cce88a5
commit
2dd68212c0
2 changed files with 18 additions and 3 deletions
|
|
@ -51,15 +51,26 @@
|
|||
*/
|
||||
@property (readonly, nonatomic, retain) NSOperationQueue *operationQueue;;
|
||||
|
||||
///--------------------------------
|
||||
/// @name Initializing HTTP Clients
|
||||
///--------------------------------
|
||||
///---------------------------------------------
|
||||
/// @name Creating and Initializing HTTP Clients
|
||||
///---------------------------------------------
|
||||
|
||||
/**
|
||||
Creates and initializes an `AFHTTPClient` object with the specified base URL.
|
||||
|
||||
@param url The base URL for the HTTP client. This argument must not be nil.
|
||||
|
||||
@return The newly-initialized HTTP client
|
||||
*/
|
||||
+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url;
|
||||
|
||||
/**
|
||||
Initializes an `AFHTTPClient` object with the specified base URL.
|
||||
|
||||
@param url The base URL for the HTTP client. This argument must not be nil.
|
||||
|
||||
@discussion This is the designated initializer for `AFHTTPClient`
|
||||
|
||||
@return The newly-initialized HTTP client
|
||||
*/
|
||||
- (id)initWithBaseURL:(NSURL *)url;
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ static NSString * AFURLEncodedStringFromStringWithEncoding(NSString *string, NSS
|
|||
@synthesize defaultHeaders = _defaultHeaders;
|
||||
@synthesize operationQueue = _operationQueue;
|
||||
|
||||
+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url {
|
||||
return [[[self alloc] initWithBaseURL:url] autorelease];
|
||||
}
|
||||
|
||||
- (id)initWithBaseURL:(NSURL *)url {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue