Objective-C
Objective-C
Example: Http.GetCacheRoot method
Demonstrates theGetCacheRoot method.
Chilkat Objective-C Downloads
#import <CkoHttp.h>
CkoHttp *http = [[CkoHttp alloc] init];
// Establish 2 cache root directories.
[http AddCacheRoot: @"c:/example/httpCacheA/"];
[http AddCacheRoot: @"c:/example/httpCacheB/"];
NSLog(@"%@%d",@"Number of cache roots: ",[http.NumCacheRoots intValue]);
NSLog(@"%@%@",@"1st cache root: ",[http GetCacheRoot: [NSNumber numberWithInt: 0]]);
NSLog(@"%@%@",@"2nd cache root: ",[http GetCacheRoot: [NSNumber numberWithInt: 1]]);
// Output:
// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/