Re: NSURLConnection and 404

2013-06-09 Thread Koen van der Drift
On Jun 9, 2013, at 5:54 AM, Jean-Daniel Dupas wrote: > The NSConnectionDelegate protocol has a method that pass you the response: > > - (void)connection:(NSURLConnection *)connection > didReceiveResponse:(NSURLResponse *)response > > You can test if the response is of type NSHTTPURLResponse (

Re: NSURLConnection and 404

2013-06-09 Thread Gerriet M. Denkmann
On 9 Jun 2013, at 16:54, Jean-Daniel Dupas wrote: > > Le 9 juin 2013 à 11:35, Gerriet M. Denkmann a écrit : > >> This works fine, but blocks my for 1 sec on a good day - who know how long >> if the net is slow: >> >> url = something/which/might/exist/or/not.gif >> data = [ NSData dataWithCo

Re: NSURLConnection and 404

2013-06-09 Thread Jean-Daniel Dupas
Le 9 juin 2013 à 11:35, Gerriet M. Denkmann a écrit : > This works fine, but blocks my for 1 sec on a good day - who know how long if > the net is slow: > > url = something/which/might/exist/or/not.gif > data = [ NSData dataWithContentsOfURL: url options: mask error: &outError ]; > > So I am

Re: NSURLConnection and 404

2013-06-09 Thread Koen van der Drift
On Jun 9, 2013, at 5:35 AM, Gerriet M. Denkmann wrote: > Is there a way to get just the status (in this case 404) without parsing the > data? > I looked at the NSURLConnection delegate methods, but did not find anything > which looked appropriate. I do something like this: - (void) connecti