29,027
社区成员
发帖
与我相关
我的任务
分享
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.test.com/test.php?variable=test1"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
NSMutableData *receivedData = [NSMutableData data];
NSString *strData = [[NSString alloc]initWithData:receivedData encoding:NSUTF8StringEncoding];
NSLog(@"This is the response: %@", strData);
}else {
}