Created
November 19, 2012 21:03
-
-
Save phatblat/4113874 to your computer and use it in GitHub Desktop.
A path for AFNetworking to prevent repeated query string parameters from having the "name" changed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/KPServiceTests/Library/AFNetworking/AFHTTPClient.m b/ios/KPServiceTests/Library/AFNetworking/AFHTTPClient.m | |
index 96a70609f198d7549497cbb37f777e3076ac898a..ad8df8f13e2dd3e4c9c9cef5eee7eadfa1809754 100755 | |
--- a/ios/KPServiceTests/Library/AFNetworking/AFHTTPClient.m | |
+++ b/ios/KPServiceTests/Library/AFNetworking/AFHTTPClient.m | |
@@ -156,7 +156,7 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { | |
}]; | |
} else if([value isKindOfClass:[NSArray class]]) { | |
[value enumerateObjectsUsingBlock:^(id nestedValue, NSUInteger idx, BOOL *stop) { | |
- [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; | |
+ [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, nestedValue)]; | |
}]; | |
} else { | |
[mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment