mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 12:27:52 +08:00
Fix for contentType inspector methods
This commit is contained in:
@@ -217,11 +217,11 @@
|
||||
}
|
||||
|
||||
- (BOOL)isXML {
|
||||
return [[self contentType] isEqualToString:@"application/xml"];
|
||||
return [[self contentType] rangeOfString:@"application/xml" options:NSCaseInsensitiveSearch|NSAnchoredSearch].length > 0;
|
||||
}
|
||||
|
||||
- (BOOL)isJSON {
|
||||
return [[self contentType] isEqualToString:@"application/json"];
|
||||
return [[self contentType] rangeOfString:@"application/json" options:NSCaseInsensitiveSearch|NSAnchoredSearch].length > 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user