mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
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]];
|
||||
for (NSString *string in accepts) {
|
||||
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";
|
||||
}
|
||||
[lowerAccepts addObject:lowerAccept];
|
||||
|
Loading…
Reference in New Issue
Block a user