I get a small image, so I need the timeout interval to be short. If the image is not sent after a few seconds, it will probably never be sent. For some unknown reason, my NSURLConnection never breaks, no matter how shorter I set the timeoutInterval .
// Create the URL request NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://www.tumblr.com/api/write"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:0.00000001]; [NSURLConnection connectionWithRequest:request delegate:self];
I have a breakpoint at - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error , but it never starts. My images continue to be published just fine, they appear on Tumblr, despite the tiny timeoutInterval .
nsurlconnection nsurlrequest nsmutableurlrequest
kubi Apr 29 '10 at 11:46 april 2010-04-29 11:46
source share