forked from loafle/openapi-generator-original
Merge pull request #2210 from svenluzar/master
ApiClient Bugfix: containsString removed to support iOS 7
This commit is contained in:
commit
23696c5eb3
@ -136,7 +136,8 @@ static void (^reachabilityChangeBlock)(int);
|
|||||||
NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]];
|
NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]];
|
||||||
for (NSString *string in accepts) {
|
for (NSString *string in accepts) {
|
||||||
NSString * lowerAccept = [string lowercaseString];
|
NSString * lowerAccept = [string lowercaseString];
|
||||||
if ([lowerAccept containsString:@"application/json"]) {
|
// use rangeOfString instead of containsString for iOS 7 support
|
||||||
|
if ([lowerAccept rangeOfString:@"application/json"].location != NSNotFound) {
|
||||||
return @"application/json";
|
return @"application/json";
|
||||||
}
|
}
|
||||||
[lowerAccepts addObject:lowerAccept];
|
[lowerAccepts addObject:lowerAccept];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user