Hi,
what is the difference between NSURLConnection
and NSUrl
?
i mean if i am downloading a file, does it make and difference which one i use?
Rgds
for:
NSString *myUrl = @"http://www.test.com/";
NSString *returnData = [NSString stringWithContentsOfURL:[NSURL URLWithString: myUrl]];
or
NSString *myUrl = @"http://www.test.com/";
NSURLRequest *myRequest = [[NSURLRequest alloc] initWithURL: [NSURL URLWithString:myUrl] ];
NSString *returnData = [NSURLConnection sendSynchronousRequest:myRequest returningResponse: nil error: nil ];
whats the difference?
thks