mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Adding the ability to set a default content decoding other than NSUTF8StringEncoding whenever HTTP headers do not contain any information. closes #547
This commit is contained in:
committed by
Blake Watters
parent
bd5612314b
commit
693d839364
@@ -88,6 +88,7 @@ NSString *RKPathAppendQueryParams(NSString *resourcePath, NSDictionary *queryPar
|
||||
@synthesize cachePolicy = _cachePolicy;
|
||||
@synthesize requestQueue = _requestQueue;
|
||||
@synthesize timeoutInterval = _timeoutInterval;
|
||||
@synthesize defaultHTTPEncoding = _defaultHTTPEncoding;
|
||||
@synthesize cacheTimeoutInterval = _cacheTimeoutInterval;
|
||||
|
||||
+ (RKClient *)sharedClient {
|
||||
@@ -121,6 +122,7 @@ NSString *RKPathAppendQueryParams(NSString *resourcePath, NSDictionary *queryPar
|
||||
if (self) {
|
||||
_HTTPHeaders = [[NSMutableDictionary alloc] init];
|
||||
_additionalRootCertificates = [[NSMutableSet alloc] init];
|
||||
_defaultHTTPEncoding = NSUTF8StringEncoding;
|
||||
self.cacheTimeoutInterval = 0;
|
||||
self.serviceUnavailableAlertEnabled = NO;
|
||||
self.serviceUnavailableAlertTitle = NSLocalizedString(@"Service Unavailable", nil);
|
||||
@@ -212,6 +214,7 @@ NSString *RKPathAppendQueryParams(NSString *resourcePath, NSDictionary *queryPar
|
||||
request.cache = self.requestCache;
|
||||
request.queue = self.requestQueue;
|
||||
request.reachabilityObserver = self.reachabilityObserver;
|
||||
request.defaultHTTPEncoding = self.defaultHTTPEncoding;
|
||||
|
||||
request.additionalRootCertificates = self.additionalRootCertificates;
|
||||
request.disableCertificateValidation = self.disableCertificateValidation;
|
||||
|
||||
Reference in New Issue
Block a user