mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-28 20:55:32 +08:00
Add conditional passing of parameters into the AFHTTPClient to support OAuth signing. fixes #1200
This commit is contained in:
@@ -354,7 +354,9 @@ static NSString *RKMIMETypeFromAFHTTPClientParameterEncoding(AFHTTPClientParamet
|
||||
{
|
||||
NSMutableURLRequest* request;
|
||||
if (parameters && !([method isEqualToString:@"GET"] || [method isEqualToString:@"HEAD"] || [method isEqualToString:@"DELETE"])) {
|
||||
request = [self.HTTPClient requestWithMethod:method path:path parameters:nil];
|
||||
// NOTE: If the HTTP client has been subclasses, then the developer may be trying to perform signing on the request
|
||||
NSDictionary *parametersForClient = [self.HTTPClient isMemberOfClass:[AFHTTPClient class]] ? nil : parameters;
|
||||
request = [self.HTTPClient requestWithMethod:method path:path parameters:parametersForClient];
|
||||
|
||||
NSError *error = nil;
|
||||
NSString *charset = (__bridge NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.HTTPClient.stringEncoding));
|
||||
|
||||
Reference in New Issue
Block a user