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:
Rui D Lopes
2012-02-05 23:18:06 +00:00
committed by Blake Watters
parent bd5612314b
commit 693d839364
6 changed files with 33 additions and 9 deletions

View File

@@ -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;