Reworked reachability initialization to support usage when there is no Internet connectivity.

* When the reachabilityObserver property of RKClient is nil, assume we have reachability
* When the baseURL configured contains an IP address or localhost, use hostname based reachability
* Else fall through to using Internet reachability if the user has not configured an observer directly
This commit is contained in:
Blake Watters
2011-11-09 08:17:46 -05:00
parent dad00a4f6f
commit fd80eae643
4 changed files with 39 additions and 4 deletions

View File

@@ -117,4 +117,12 @@
*/
- (NSString *)MIMETypeForPathExtension;
/**
Returns YES if the receiver contains a valid IP address
For example, @"127.0.0.1" and @"10.0.1.35" would return YES
while @"restkit.org" would return NO
*/
- (BOOL)isIPAddress;
@end