如何从Web服务器上获取iphone本机应用程序上的文件和目录名称?
答案 0 :(得分:0)
NSData *urlData;
NSString *urlString = @"mysite.com/myfile";
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval: 10.0];
NSURLConnection *connection=[[NSURLConnection alloc] initWithRequest:request delegate:nil];
if (connection) {
urlData = [ NSURLConnection sendSynchronousRequest: request
}
[connection release];